DefaultValueAttribute 构造函数  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DefaultValueAttribute 类的新实例。
重载
DefaultValueAttribute(Boolean)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 DefaultValueAttribute 值初始化 Boolean 类的新实例。
public:
 DefaultValueAttribute(bool value);public DefaultValueAttribute (bool value);new System.ComponentModel.DefaultValueAttribute : bool -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Boolean)参数
适用于
DefaultValueAttribute(Type, String)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
初始化 DefaultValueAttribute 类的新实例,将指定的值转换为指定的类型,并将固定区域性作为翻译上下文。
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.DefaultValueAttributePublic Sub New (type As Type, value As String)参数
- value
- String
可以通过该类型的 String 和美国英语转换为该类型的 TypeConverter。
适用于
DefaultValueAttribute(UInt64)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt64 类的新实例。
public:
 DefaultValueAttribute(System::UInt64 value);[System.CLSCompliant(false)]
public DefaultValueAttribute (ulong value);[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint64 -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As ULong)参数
- value
- UInt64
默认的无符号长整型值。
- 属性
适用于
DefaultValueAttribute(UInt32)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt32 类的新实例。
public:
 DefaultValueAttribute(System::UInt32 value);[System.CLSCompliant(false)]
public DefaultValueAttribute (uint value);[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint32 -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As UInteger)参数
- value
- UInt32
默认的无符号整数值。
- 属性
适用于
DefaultValueAttribute(UInt16)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 UInt16 类的新实例。
public:
 DefaultValueAttribute(System::UInt16 value);[System.CLSCompliant(false)]
public DefaultValueAttribute (ushort value);[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : uint16 -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As UShort)参数
- value
- UInt16
默认的无符号 16 位整数值。
- 属性
适用于
DefaultValueAttribute(String)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 DefaultValueAttribute 初始化 String 类的新实例。
public:
 DefaultValueAttribute(System::String ^ value);public DefaultValueAttribute (string value);public DefaultValueAttribute (string? value);new System.ComponentModel.DefaultValueAttribute : string -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As String)参数
适用于
DefaultValueAttribute(SByte)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
重要
此 API 不符合 CLS。
使用 DefaultValueAttribute 值初始化 SByte 类的新实例。
public:
 DefaultValueAttribute(System::SByte value);[System.CLSCompliant(false)]
public DefaultValueAttribute (sbyte value);[<System.CLSCompliant(false)>]
new System.ComponentModel.DefaultValueAttribute : sbyte -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As SByte)参数
- value
- SByte
默认的带符号字节值。
- 属性
适用于
DefaultValueAttribute(Single)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用单精度浮点数字初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(float value);public DefaultValueAttribute (float value);new System.ComponentModel.DefaultValueAttribute : single -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Single)参数
- value
- Single
单精度浮点数字,这是默认值。
适用于
DefaultValueAttribute(Int64)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 64 位有符号整数初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(long value);public DefaultValueAttribute (long value);new System.ComponentModel.DefaultValueAttribute : int64 -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Long)参数
- value
- Int64
64 位有符号整数,这是默认值。
适用于
DefaultValueAttribute(Int32)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 32 位有符号整数初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(int value);public DefaultValueAttribute (int value);new System.ComponentModel.DefaultValueAttribute : int -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Integer)参数
- value
- Int32
32 位有符号整数,这是默认值。
适用于
DefaultValueAttribute(Int16)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 16 位有符号整数初始化 DefaultValueAttribute 类的实例。
public:
 DefaultValueAttribute(short value);public DefaultValueAttribute (short value);new System.ComponentModel.DefaultValueAttribute : int16 -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Short)参数
- value
- Int16
16 位有符号整数,这是默认值。
适用于
DefaultValueAttribute(Double)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用双精度浮点数字初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(double value);public DefaultValueAttribute (double value);new System.ComponentModel.DefaultValueAttribute : double -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Double)参数
- value
- Double
双精度浮点数字,这是默认值。
适用于
DefaultValueAttribute(Char)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 Unicode 字符初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(char value);public DefaultValueAttribute (char value);new System.ComponentModel.DefaultValueAttribute : char -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Char)参数
- value
- Char
Unicode 字符,这是默认值。
适用于
DefaultValueAttribute(Byte)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
使用 8 位无符号整数初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(System::Byte value);public DefaultValueAttribute (byte value);new System.ComponentModel.DefaultValueAttribute : byte -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Byte)参数
- value
- Byte
8 位无符号整数,这是默认值。
适用于
DefaultValueAttribute(Object)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
初始化 DefaultValueAttribute 类的新实例。
public:
 DefaultValueAttribute(System::Object ^ value);public DefaultValueAttribute (object value);public DefaultValueAttribute (object? value);new System.ComponentModel.DefaultValueAttribute : obj -> System.ComponentModel.DefaultValueAttributePublic Sub New (value As Object)