CustomAttributeNamedArgument 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 CustomAttributeNamedArgument 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| CustomAttributeNamedArgument(MemberInfo, Object) |
初始化类的新实例,该实例 CustomAttributeNamedArgument 表示自定义特性的指定字段或属性,并指定字段或属性的值。 |
| CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument) |
初始化类的新实例,该实例 CustomAttributeNamedArgument 表示自定义特性的指定字段或属性,并指定描述 CustomAttributeTypedArgument 字段或属性的类型和值的对象。 |
CustomAttributeNamedArgument(MemberInfo, Object)
初始化类的新实例,该实例 CustomAttributeNamedArgument 表示自定义特性的指定字段或属性,并指定字段或属性的值。
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
自定义属性的字段或属性。 新 CustomAttributeNamedArgument 对象表示此成员及其值。
- value
- Object
自定义属性的字段或属性的值。
例外
memberInfo 是 null。
memberInfo 不是自定义属性的字段或属性。
注解
此构造函数供类的 CustomAttributeNamedArgument 继承者使用。 它不适用于应用程序代码。
适用于
CustomAttributeNamedArgument(MemberInfo, CustomAttributeTypedArgument)
初始化类的新实例,该实例 CustomAttributeNamedArgument 表示自定义特性的指定字段或属性,并指定描述 CustomAttributeTypedArgument 字段或属性的类型和值的对象。
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
自定义属性的字段或属性。 新 CustomAttributeNamedArgument 对象表示此成员及其值。
- typedArgument
- CustomAttributeTypedArgument
描述字段或属性的类型和值的对象。
例外
memberInfo 是 null。
注解
此构造函数供类的 CustomAttributeNamedArgument 继承者使用。 它不适用于应用程序代码。