DefaultValueAttribute 构造函数
定义
初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class.
重载
| DefaultValueAttribute(Boolean) |
使用 DefaultValueAttribute 值初始化 Boolean 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a Boolean value. |
| DefaultValueAttribute(Type, String) |
初始化 DefaultValueAttribute 类的新实例,将指定的值转换为指定的类型,并将固定区域性作为翻译上下文。Initializes a new instance of the DefaultValueAttribute class, converting the specified value to the specified type, and using an invariant culture as the translation context. |
| DefaultValueAttribute(UInt64) |
使用 DefaultValueAttribute 值初始化 UInt64 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt64 value. |
| DefaultValueAttribute(UInt32) |
使用 DefaultValueAttribute 值初始化 UInt32 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt32 value. |
| DefaultValueAttribute(UInt16) |
使用 DefaultValueAttribute 值初始化 UInt16 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt16 value. |
| DefaultValueAttribute(String) |
使用 DefaultValueAttribute 初始化 String 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a String. |
| DefaultValueAttribute(SByte) |
使用 DefaultValueAttribute 值初始化 SByte 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a SByte value. |
| DefaultValueAttribute(Single) |
使用单精度浮点数字初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a single-precision floating point number. |
| DefaultValueAttribute(Int64) |
使用 64 位有符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a 64-bit signed integer. |
| DefaultValueAttribute(Int32) |
使用 32 位有符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a 32-bit signed integer. |
| DefaultValueAttribute(Int16) |
使用 16 位有符号整数初始化 DefaultValueAttribute 类的实例。Initializes a new instance of the DefaultValueAttribute class using a 16-bit signed integer. |
| DefaultValueAttribute(Double) |
使用双精度浮点数字初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a double-precision floating point number. |
| DefaultValueAttribute(Char) |
使用 Unicode 字符初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a Unicode character. |
| DefaultValueAttribute(Byte) |
使用 8 位无符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using an 8-bit unsigned integer. |
| DefaultValueAttribute(Object) |
初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class. |
DefaultValueAttribute(Boolean)
使用 DefaultValueAttribute 值初始化 Boolean 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a Boolean value.
public:
DefaultValueAttribute(bool value);
public DefaultValueAttribute (bool value);
new System.ComponentModel.DefaultValueAttribute : bool -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Boolean)
参数
适用于
DefaultValueAttribute(Type, String)
初始化 DefaultValueAttribute 类的新实例,将指定的值转换为指定的类型,并将固定区域性作为翻译上下文。Initializes a new instance of the DefaultValueAttribute class, converting the specified value to the specified type, and using an invariant culture as the translation context.
public:
DefaultValueAttribute(Type ^ type, System::String ^ value);
public DefaultValueAttribute (Type type, string value);
public DefaultValueAttribute (Type type, string? value);
new System.ComponentModel.DefaultValueAttribute : Type * string -> System.ComponentModel.DefaultValueAttribute
Public Sub New (type As Type, value As String)
参数
- value
- String
可以通过该类型的 String 和美国英语转换为该类型的 TypeConverter。A String that can be converted to the type using the TypeConverter for the type and the U.S. English culture.
适用于
DefaultValueAttribute(UInt64)
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt64 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt64 value.
public:
DefaultValueAttribute(System::UInt64 value);
[System.CLSCompliant(false)]
public DefaultValueAttribute (ulong value);
public DefaultValueAttribute (ulong value);
[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint64 -> System.ComponentModel.DefaultValueAttribute
new System.ComponentModel.DefaultValueAttribute : uint64 -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As ULong)
参数
- value
- UInt64
默认的无符号长整型值。The default unsigned long integer value.
- 属性
适用于
DefaultValueAttribute(UInt32)
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt32 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt32 value.
public:
DefaultValueAttribute(System::UInt32 value);
[System.CLSCompliant(false)]
public DefaultValueAttribute (uint value);
public DefaultValueAttribute (uint value);
[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint32 -> System.ComponentModel.DefaultValueAttribute
new System.ComponentModel.DefaultValueAttribute : uint32 -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As UInteger)
参数
- value
- UInt32
默认的无符号整数值。The default unsigned integer value.
- 属性
适用于
DefaultValueAttribute(UInt16)
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt16 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a UInt16 value.
public:
DefaultValueAttribute(System::UInt16 value);
[System.CLSCompliant(false)]
public DefaultValueAttribute (ushort value);
public DefaultValueAttribute (ushort value);
[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint16 -> System.ComponentModel.DefaultValueAttribute
new System.ComponentModel.DefaultValueAttribute : uint16 -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As UShort)
参数
- value
- UInt16
默认的无符号 16 位整数值。The default unsigned 16-bit integer value.
- 属性
适用于
DefaultValueAttribute(String)
使用 DefaultValueAttribute 初始化 String 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a String.
public:
DefaultValueAttribute(System::String ^ value);
public DefaultValueAttribute (string value);
public DefaultValueAttribute (string? value);
new System.ComponentModel.DefaultValueAttribute : string -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As String)
参数
适用于
DefaultValueAttribute(SByte)
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 SByte 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a SByte value.
public:
DefaultValueAttribute(System::SByte value);
[System.CLSCompliant(false)]
public DefaultValueAttribute (sbyte value);
public DefaultValueAttribute (sbyte value);
[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : sbyte -> System.ComponentModel.DefaultValueAttribute
new System.ComponentModel.DefaultValueAttribute : sbyte -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As SByte)
参数
- value
- SByte
默认的带符号字节值。The default signed byte value.
- 属性
适用于
DefaultValueAttribute(Single)
使用单精度浮点数字初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a single-precision floating point number.
public:
DefaultValueAttribute(float value);
public DefaultValueAttribute (float value);
new System.ComponentModel.DefaultValueAttribute : single -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Single)
参数
- value
- Single
单精度浮点数字,这是默认值。A single-precision floating point number that is the default value.
适用于
DefaultValueAttribute(Int64)
使用 64 位有符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a 64-bit signed integer.
public:
DefaultValueAttribute(long value);
public DefaultValueAttribute (long value);
new System.ComponentModel.DefaultValueAttribute : int64 -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Long)
参数
- value
- Int64
64 位有符号整数,这是默认值。A 64-bit signed integer that is the default value.
适用于
DefaultValueAttribute(Int32)
使用 32 位有符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a 32-bit signed integer.
public:
DefaultValueAttribute(int value);
public DefaultValueAttribute (int value);
new System.ComponentModel.DefaultValueAttribute : int -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Integer)
参数
- value
- Int32
32 位有符号整数,这是默认值。A 32-bit signed integer that is the default value.
适用于
DefaultValueAttribute(Int16)
使用 16 位有符号整数初始化 DefaultValueAttribute 类的实例。Initializes a new instance of the DefaultValueAttribute class using a 16-bit signed integer.
public:
DefaultValueAttribute(short value);
public DefaultValueAttribute (short value);
new System.ComponentModel.DefaultValueAttribute : int16 -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Short)
参数
- value
- Int16
16 位有符号整数,这是默认值。A 16-bit signed integer that is the default value.
适用于
DefaultValueAttribute(Double)
使用双精度浮点数字初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a double-precision floating point number.
public:
DefaultValueAttribute(double value);
public DefaultValueAttribute (double value);
new System.ComponentModel.DefaultValueAttribute : double -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Double)
参数
- value
- Double
双精度浮点数字,这是默认值。A double-precision floating point number that is the default value.
适用于
DefaultValueAttribute(Char)
使用 Unicode 字符初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using a Unicode character.
public:
DefaultValueAttribute(char value);
public DefaultValueAttribute (char value);
new System.ComponentModel.DefaultValueAttribute : char -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Char)
参数
- value
- Char
Unicode 字符,这是默认值。A Unicode character that is the default value.
适用于
DefaultValueAttribute(Byte)
使用 8 位无符号整数初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class using an 8-bit unsigned integer.
public:
DefaultValueAttribute(System::Byte value);
public DefaultValueAttribute (byte value);
new System.ComponentModel.DefaultValueAttribute : byte -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Byte)
参数
- value
- Byte
8 位无符号整数,这是默认值。An 8-bit unsigned integer that is the default value.
适用于
DefaultValueAttribute(Object)
初始化 DefaultValueAttribute 类的新实例。Initializes a new instance of the DefaultValueAttribute class.
public:
DefaultValueAttribute(System::Object ^ value);
public DefaultValueAttribute (object value);
public DefaultValueAttribute (object? value);
new System.ComponentModel.DefaultValueAttribute : obj -> System.ComponentModel.DefaultValueAttribute
Public Sub New (value As Object)