PropertyBuilder 成员

定义类型的属性 (Property)。

下表列出了由 PropertyBuilder 类型公开的成员。

公共属性

  名称 说明
Public property Attributes 已重写。获取此属性 (Property) 的属性 (Attribute)。
Public property CanRead 已重写。获取一个值,该值指示该属性 (Property) 是否可读。
Public property CanWrite 已重写。获取一个值,该值指示此属性 (Property) 是否可写。
Public property DeclaringType 已重写。获取声明该成员的类。
Public property IsSpecialName  获取一个值,该值指示此属性 (Property) 是否是特殊名称。(从 PropertyInfo 继承。)
Public property MemberType  获取一个 MemberTypes 值,该值指示此成员是属性 (Property)。(从 PropertyInfo 继承。)
Public property MetadataToken  获取一个值,该值标识元数据元素。(从 MemberInfo 继承。)
Public property Module 已重写。获取在其中定义了特定类型的模块,该类型即为声明当前属性 (Property) 的类型。
Public property Name 已重写。获取此成员的名称。
Public property PropertyToken 检索此属性 (Property) 的标记。
Public property PropertyType 已重写。获取此属性 (Property) 的字段类型。
Public property ReflectedType 已重写。获取用于获取 MemberInfo 的此实例的类对象。

页首

公共方法

  名称 说明
Public method AddOtherMethod 添加与此属性 (Property) 关联的其他方法之一。
Public method Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method GetAccessors 已重载。 返回此属性 (Property) 上的 getset 访问器数组。
Public method GetConstantValue  由编译器返回与属性 (Property) 关联的文本值。 (从 PropertyInfo 继承。)
Public method GetCustomAttributes 已重载。 已重写。 返回在此属性上定义的所有自定义属性。
Public method GetGetMethod 已重载。 返回此属性 (Property) 的 get 访问器方法。
Public method GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method GetIndexParameters 已重写。 返回此属性 (Property) 的所有索引参数的数组。
Public method GetOptionalCustomModifiers  返回一个类型数组,其中的类型表示属性 (Property) 的可选自定义修饰符。 (从 PropertyInfo 继承。)
Public method GetRawConstantValue  由编译器返回与属性 (Property) 关联的文本值。 (从 PropertyInfo 继承。)
Public method GetRequiredCustomModifiers  返回一个类型数组,其中的类型表示属性 (Property) 的必需自定义修饰符。 (从 PropertyInfo 继承。)
Public method GetSetMethod 已重载。 返回此属性 (Property) 的 set 访问器方法。
Public method GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method GetValue 已重载。 已重写。 通过调用 getter 来获取属性 (Property) 值。
Public method IsDefined 已重写。 指示是否在此属性 (Property) 上定义一个或多个 attributeType 的实例。
Public method Static ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method SetConstant 设置该属性 (Property) 的默认值。
Public method SetCustomAttribute 已重载。 设置自定义属性 (Attribute)。
Public method SetGetMethod 设置获取属性 (Property) 值的方法。
Public method SetSetMethod 设置用于设置属性 (Property) 值的方法。
Public method SetValue 已重载。 已重写。 将给定对象的属性值设置为给定值。
Public method ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

显式接口实现

  名称 说明
Explicit interface implementation Method System.Runtime.InteropServices._PropertyBuilder.GetIDsOfNames 将一组名称映射为对应的一组调度标识符。
Explicit interface implementation Method System.Runtime.InteropServices._PropertyBuilder.GetTypeInfo 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。
Explicit interface implementation Method System.Runtime.InteropServices._PropertyBuilder.GetTypeInfoCount 检索对象提供的类型信息接口的数量(0 或 1)。
Explicit interface implementation Method System.Runtime.InteropServices._PropertyBuilder.Invoke 提供对某一对象公开的属性 (Property) 和方法的访问。

页首

请参见

参考

PropertyBuilder 类
System.Reflection.Emit 命名空间