CustomAttributeNamedArgument 建構函式

定義

初始化 CustomAttributeNamedArgument 類別的新執行個體。Initializes a new instance of the CustomAttributeNamedArgument class.

多載

CustomAttributeNamedArgument(MemberInfo, Object)

初始化 CustomAttributeNamedArgument 類別的新執行個體,這個執行個體表示自訂屬性 (Attribute) 的指定欄位或屬性 (Property),並且指定欄位或屬性 (Property) 的值。Initializes a new instance of the CustomAttributeNamedArgument class, which represents the specified field or property of the custom attribute, and specifies the value of the field or property.

CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument)

初始化 CustomAttributeNamedArgument 類別的新執行個體,這個執行個體表示自訂屬性 (Attribute) 的指定欄位或屬性 (Property),並且指定 CustomAttributeTypedArgument 物件,描述欄位或屬性 (Property) 的型別和值。Initializes a new instance of the CustomAttributeNamedArgument class, which represents the specified field or property of the custom attribute, and specifies a CustomAttributeTypedArgument object that describes the type and value of the field or property.

CustomAttributeNamedArgument(MemberInfo, Object)

初始化 CustomAttributeNamedArgument 類別的新執行個體,這個執行個體表示自訂屬性 (Attribute) 的指定欄位或屬性 (Property),並且指定欄位或屬性 (Property) 的值。Initializes a new instance of the CustomAttributeNamedArgument class, which represents the specified field or property of the custom attribute, and specifies the value of the field or property.

public:
 CustomAttributeNamedArgument(System::Reflection::MemberInfo ^ memberInfo, System::Object ^ value);
public CustomAttributeNamedArgument (System.Reflection.MemberInfo memberInfo, object? value);
public CustomAttributeNamedArgument (System.Reflection.MemberInfo memberInfo, object value);
new System.Reflection.CustomAttributeNamedArgument : System.Reflection.MemberInfo * obj -> System.Reflection.CustomAttributeNamedArgument
Public Sub New (memberInfo As MemberInfo, value As Object)

參數

memberInfo
MemberInfo

自訂屬性 (Attribute) 的欄位或屬性 (Property)。A field or property of the custom attribute. 新的 CustomAttributeNamedArgument 物件,表示這個成員及其值。The new CustomAttributeNamedArgument object represents this member and its value.

value
Object

自訂屬性 (Attribute) 之欄位或屬性 (Property) 的值。The value of the field or property of the custom attribute.

例外狀況

memberInfonullmemberInfo is null.

memberInfo 不是自訂屬性 (Attribute) 之欄位或屬性 (Property) 的值。memberInfo is not a field or property of the custom attribute.

備註

這個函式可供類別的繼承者使用 CustomAttributeNamedArgumentThis constructor is for use by inheritors of the CustomAttributeNamedArgument class. 它不適合在應用程式程式碼中使用。It is not intended for use in application code.

適用於

CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument)

初始化 CustomAttributeNamedArgument 類別的新執行個體,這個執行個體表示自訂屬性 (Attribute) 的指定欄位或屬性 (Property),並且指定 CustomAttributeTypedArgument 物件,描述欄位或屬性 (Property) 的型別和值。Initializes a new instance of the CustomAttributeNamedArgument class, which represents the specified field or property of the custom attribute, and specifies a CustomAttributeTypedArgument object that describes the type and value of the field or property.

public:
 CustomAttributeNamedArgument(System::Reflection::MemberInfo ^ memberInfo, System::Reflection::CustomAttributeTypedArgument typedArgument);
public CustomAttributeNamedArgument (System.Reflection.MemberInfo memberInfo, System.Reflection.CustomAttributeTypedArgument typedArgument);
new System.Reflection.CustomAttributeNamedArgument : System.Reflection.MemberInfo * System.Reflection.CustomAttributeTypedArgument -> System.Reflection.CustomAttributeNamedArgument
Public Sub New (memberInfo As MemberInfo, typedArgument As CustomAttributeTypedArgument)

參數

memberInfo
MemberInfo

自訂屬性 (Attribute) 的欄位或屬性 (Property)。A field or property of the custom attribute. 新的 CustomAttributeNamedArgument 物件,表示這個成員及其值。The new CustomAttributeNamedArgument object represents this member and its value.

typedArgument
CustomAttributeTypedArgument

物件,描述欄位或屬性的型別和值。An object that describes the type and value of the field or property.

例外狀況

memberInfonullmemberInfo is null.

備註

這個函式可供類別的繼承者使用 CustomAttributeNamedArgumentThis constructor is for use by inheritors of the CustomAttributeNamedArgument class. 它不適合在應用程式程式碼中使用。It is not intended for use in application code.

適用於