ObsoleteAttribute ObsoleteAttribute ObsoleteAttribute ObsoleteAttribute Constructors

定义

重载

ObsoleteAttribute() ObsoleteAttribute() ObsoleteAttribute()

使用默认属性初始化 ObsoleteAttribute 类的新实例。Initializes a new instance of the ObsoleteAttribute class with default properties.

ObsoleteAttribute(String) ObsoleteAttribute(String) ObsoleteAttribute(String) ObsoleteAttribute(String)

使用指定的变通方法消息初始化 ObsoleteAttribute 类的新实例。Initializes a new instance of the ObsoleteAttribute class with a specified workaround message.

ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean)

使用变通方法消息和布尔值初始化 ObsoleteAttribute 类的新实例,该布尔值指示是否将使用已过时的元素视为错误。Initializes a new instance of the ObsoleteAttribute class with a workaround message and a Boolean value indicating whether the obsolete element usage is considered an error.

ObsoleteAttribute() ObsoleteAttribute() ObsoleteAttribute()

使用默认属性初始化 ObsoleteAttribute 类的新实例。Initializes a new instance of the ObsoleteAttribute class with default properties.

public:
 ObsoleteAttribute();
public ObsoleteAttribute ();
Public Sub New ()

注解

下表显示 ObsoleteAttribute 的实例的初始属性值。The following table shows the initial property values for an instance of ObsoleteAttribute.

PropertyProperty Value
IsError false
Message null

ObsoleteAttribute(String) ObsoleteAttribute(String) ObsoleteAttribute(String) ObsoleteAttribute(String)

使用指定的变通方法消息初始化 ObsoleteAttribute 类的新实例。Initializes a new instance of the ObsoleteAttribute class with a specified workaround message.

public:
 ObsoleteAttribute(System::String ^ message);
public ObsoleteAttribute (string message);
new ObsoleteAttribute : string -> ObsoleteAttribute
Public Sub New (message As String)

参数

message
String String String String

描述可选的变通方法的文本字符串。The text string that describes alternative workarounds.

注解

下表显示 ObsoleteAttribute 的实例的初始属性值。The following table shows the initial property values for an instance of ObsoleteAttribute.

PropertyProperty Value
IsError falsefalse.
Message 变通方法消息中。The workaround message.

ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean) ObsoleteAttribute(String, Boolean)

使用变通方法消息和布尔值初始化 ObsoleteAttribute 类的新实例,该布尔值指示是否将使用已过时的元素视为错误。Initializes a new instance of the ObsoleteAttribute class with a workaround message and a Boolean value indicating whether the obsolete element usage is considered an error.

public:
 ObsoleteAttribute(System::String ^ message, bool error);
public ObsoleteAttribute (string message, bool error);
new ObsoleteAttribute : string * bool -> ObsoleteAttribute
Public Sub New (message As String, error As Boolean)

参数

message
String String String String

描述可选的变通方法的文本字符串。The text string that describes alternative workarounds.

error
Boolean Boolean Boolean Boolean

如果使用过时的元素生成编译器错误,则为 true;如果生成编译器警告,则为 falsetrue if the obsolete element usage generates a compiler error; false if it generates a compiler warning.

注解

下表显示 ObsoleteAttribute 的实例的初始属性值。The following table shows the initial property values for an instance of ObsoleteAttribute.

PropertyProperty Value
IsError error 值。The error value.
Message message 值。The message value.

适用于