PropertyInfo 成员

发现属性 (Property) 的属性 (Attribute) 并提供对属性 (Property) 元数据的访问。

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

受保护的构造函数

  名称 说明
Protected method Supported by the .NET Compact Framework PropertyInfo 初始化 PropertyInfo 类的新实例。

页首

公共属性

  名称 说明
Public property Supported by the .NET Compact Framework Attributes 获取此属性 (Property) 的属性 (Attribute)。
Public property Supported by the .NET Compact Framework CanRead 获取一个值,该值指示该属性 (Property) 是否可读。
Public property Supported by the .NET Compact Framework CanWrite 获取一个值,该值指示此属性 (Property) 是否可写。
Public property Supported by the .NET Compact Framework DeclaringType  获取声明该成员的类。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework IsSpecialName 获取一个值,该值指示此属性 (Property) 是否是特殊名称。
Public property Supported by the .NET Compact Framework MemberType 获取一个 MemberTypes 值,该值指示此成员是属性 (Property)。
Public property MetadataToken  获取一个值,该值标识元数据元素。(从 MemberInfo 继承。)
Public property Module  获取一个模块,在该模块中已经定义一个类型,该类型用于声明由当前 MemberInfo 表示的成员。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework Name  获取当前成员的名称。(从 MemberInfo 继承。)
Public property Supported by the .NET Compact Framework PropertyType 获取此属性 (Property) 的类型。
Public property Supported by the .NET Compact Framework ReflectedType  获取用于获取 MemberInfo 的此实例的类对象。(从 MemberInfo 继承。)

页首

公共方法

(请参见 受保护的方法 )

  名称 说明
Public method Supported by the .NET Compact Framework Equals  已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetAccessors 已重载。 返回此属性上的 getset 访问器数组。
Public method GetConstantValue 由编译器返回与属性 (Property) 关联的文本值。
Public method Supported by the .NET Compact Framework GetCustomAttributes  已重载。 在派生类中被重写时,返回应用于此成员的所有属性。 (从 MemberInfo 继承。)
Public method Supported by the .NET Compact Framework GetGetMethod 已重载。 返回表示此属性 (Property) 的 get 访问器的 MethodInfo
Public method Supported by the .NET Compact Framework GetHashCode  用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetIndexParameters 当在派生类中重写时,返回此属性 (Property) 的所有索引参数的数组。
Public method GetOptionalCustomModifiers 返回一个类型数组,其中的类型表示属性 (Property) 的可选自定义修饰符。
Public method GetRawConstantValue 由编译器返回与属性 (Property) 关联的文本值。
Public method GetRequiredCustomModifiers 返回一个类型数组,其中的类型表示属性 (Property) 的必需自定义修饰符。
Public method Supported by the .NET Compact Framework GetSetMethod 已重载。 返回表示此属性 (Property) 的 set 访问器的 MethodInfo
Public method Supported by the .NET Compact Framework GetType  获取当前实例的 Type。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework GetValue 已重载。 返回属性的值。
Public method Supported by the .NET Compact Framework IsDefined  在派生类中被重写时,指示是否 attributeType 的一个或多个实例应用于此成员。 (从 MemberInfo 继承。)
Public method Static Supported by the .NET Compact Framework ReferenceEquals  确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。)
Public method Supported by the .NET Compact Framework SetValue 已重载。 将给定对象的属性 (Property) 值设置为给定值。
Public method Supported by the .NET Compact Framework ToString  返回表示当前 ObjectString。 (从 Object 继承。)

页首

受保护的方法

  名称 说明
Protected method Supported by the .NET Compact Framework Finalize  允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。)
Protected method Supported by the .NET Compact Framework MemberwiseClone  创建当前 Object 的浅表副本。 (从 Object 继承。)

页首

显式接口实现

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

页首

请参见

参考

PropertyInfo 类
System.Reflection 命名空间