CustomAttributeNamedArgument CustomAttributeNamedArgument CustomAttributeNamedArgument Constructors

定義

多載

CustomAttributeNamedArgument(MemberInfo, Object) CustomAttributeNamedArgument(MemberInfo, Object) 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(MemberInfo, CustomAttributeTypedArgument) 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(MemberInfo, Object) 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);
new System.Reflection.CustomAttributeNamedArgument : System.Reflection.MemberInfo * obj -> System.Reflection.CustomAttributeNamedArgument

參數

memberInfo
MemberInfo 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 Object 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.

備註

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

CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument) CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument) 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

參數

memberInfo
MemberInfo 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 CustomAttributeTypedArgument CustomAttributeTypedArgument

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

例外狀況

memberInfonullmemberInfo is null.

備註

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

適用於