DefaultValueAttribute 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 DefaultValueAttribute 类的新实例。
重载
DefaultValueAttribute(Boolean)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Boolean)
参数
适用于
DefaultValueAttribute(Type, String)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")]
public DefaultValueAttribute(Type type, string? value);
new System.ComponentModel.DefaultValueAttribute : Type * string -> System.ComponentModel.DefaultValueAttribute
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("Generic TypeConverters may require the generic types to be annotated. For example, NullableConverter requires the underlying type to be DynamicallyAccessedMembers All.")>]
new System.ComponentModel.DefaultValueAttribute : Type * string -> System.ComponentModel.DefaultValueAttribute
Public Sub New (type As Type, value As String)
参数
- value
- String
String可以使用该类型和美国英语区域性转换为类型TypeConverter。
- 属性
适用于
DefaultValueAttribute(UInt64)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As ULong)
参数
- value
- UInt64
默认无符号长整数值。
- 属性
适用于
DefaultValueAttribute(UInt32)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As UInteger)
参数
- value
- UInt32
默认无符号整数值。
- 属性
适用于
DefaultValueAttribute(UInt16)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As UShort)
参数
- value
- UInt16
默认无符号 16 位整数值。
- 属性
适用于
DefaultValueAttribute(String)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As String)
参数
适用于
DefaultValueAttribute(SByte)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As SByte)
参数
- value
- SByte
默认有符号字节值。
- 属性
适用于
DefaultValueAttribute(Single)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Single)
参数
- value
- Single
一个单精度浮点数,它是默认值。
适用于
DefaultValueAttribute(Int64)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Long)
参数
- value
- Int64
一个 64 位有符号整数,它是默认值。
适用于
DefaultValueAttribute(Int32)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Integer)
参数
- value
- Int32
一个 32 位有符号整数,它是默认值。
适用于
DefaultValueAttribute(Int16)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Short)
参数
- value
- Int16
一个 16 位有符号整数,它是默认值。
适用于
DefaultValueAttribute(Double)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Double)
参数
- value
- Double
一个双精度浮点数,它是默认值。
适用于
DefaultValueAttribute(Char)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Char)
参数
- value
- Char
默认值为 Unicode 字符。
适用于
DefaultValueAttribute(Byte)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Byte)
参数
- value
- Byte
默认值为 8 位无符号整数。
适用于
DefaultValueAttribute(Object)
- Source:
- DefaultValueAttribute.cs
- Source:
- DefaultValueAttribute.cs
- 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.DefaultValueAttribute
Public Sub New (value As Object)