DefaultValueAttribute 建構函式

定義

初始化 DefaultValueAttribute 類別的新執行個體。

多載

DefaultValueAttribute(Boolean)

使用 DefaultValueAttribute 值來初始化 Boolean 類別的新執行個體。

DefaultValueAttribute(Type, String)

將指定的值轉換為指定型別,並使用不變文化特性 (Invariant Culture) 做為轉譯內容,初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(UInt64)

使用 DefaultValueAttribute 值來初始化 UInt64 類別的新執行個體。

DefaultValueAttribute(UInt32)

使用 DefaultValueAttribute 值來初始化 UInt32 類別的新執行個體。

DefaultValueAttribute(UInt16)

使用 DefaultValueAttribute 值來初始化 UInt16 類別的新執行個體。

DefaultValueAttribute(String)

使用 DefaultValueAttribute 來初始化 String 類別的新執行個體。

DefaultValueAttribute(SByte)

使用 DefaultValueAttribute 值來初始化 SByte 類別的新執行個體。

DefaultValueAttribute(Single)

使用單精確度浮點數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Int64)

使用 64 位元帶正負號的整數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Int32)

使用 32 位元帶正負號的整數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Int16)

使用 16 位元帶正負號的整數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Double)

使用雙精確度浮點數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Char)

使用 Unicode 字元來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Byte)

使用 8 位元不帶正負號的整數來初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Object)

初始化 DefaultValueAttribute 類別的新執行個體。

DefaultValueAttribute(Boolean)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

參數

value
Boolean

做為預設值的 Boolean

適用於

DefaultValueAttribute(Type, String)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs

將指定的值轉換為指定型別,並使用不變文化特性 (Invariant Culture) 做為轉譯內容,初始化 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.DefaultValueAttribute
Public Sub New (type As Type, value As String)

參數

type
Type

要數值轉換成的 Type

value
String

String,可以使用型別的 TypeConverter 和美式英語文化特性來轉換為該型別。

適用於

DefaultValueAttribute(UInt64)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

參數

value
String

做為預設值的 String

適用於

DefaultValueAttribute(SByte)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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

預設帶正負號的位元組 (byte) 值。

屬性

適用於

DefaultValueAttribute(Single)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

來源:
DefaultValueAttribute.cs
來源:
DefaultValueAttribute.cs
來源:
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)

參數

value
Object

表示預設值的 Object

適用於