PropertyInfo 成员
发现属性 (Property) 的属性 (Attribute) 并提供对属性 (Property) 元数据的访问。
下表列出了由 PropertyInfo 类型公开的成员。
受保护的构造函数
名称 | 说明 | |
---|---|---|
PropertyInfo | 初始化 PropertyInfo 类的新实例。 |
页首
公共属性
名称 | 说明 | |
---|---|---|
Attributes | 获取此属性 (Property) 的属性 (Attribute)。 | |
CanRead | 获取一个值,该值指示该属性 (Property) 是否可读。 | |
CanWrite | 获取一个值,该值指示此属性 (Property) 是否可写。 | |
DeclaringType | 获取声明该成员的类。(从 MemberInfo 继承。) | |
IsSpecialName | 获取一个值,该值指示此属性 (Property) 是否是特殊名称。 | |
MemberType | 获取一个 MemberTypes 值,该值指示此成员是属性 (Property)。 | |
MetadataToken | 获取一个值,该值标识元数据元素。(从 MemberInfo 继承。) | |
Module | 获取一个模块,在该模块中已经定义一个类型,该类型用于声明由当前 MemberInfo 表示的成员。(从 MemberInfo 继承。) | |
Name | 获取当前成员的名称。(从 MemberInfo 继承。) | |
PropertyType | 获取此属性 (Property) 的类型。 | |
ReflectedType | 获取用于获取 MemberInfo 的此实例的类对象。(从 MemberInfo 继承。) |
页首
公共方法
(请参见 受保护的方法 )
名称 | 说明 | |
---|---|---|
Equals | 已重载。 确定两个 Object 实例是否相等。 (从 Object 继承。) | |
GetAccessors | 已重载。 返回此属性上的 get 和 set 访问器数组。 | |
GetConstantValue | 由编译器返回与属性 (Property) 关联的文本值。 | |
GetCustomAttributes | 已重载。 在派生类中被重写时,返回应用于此成员的所有属性。 (从 MemberInfo 继承。) | |
GetGetMethod | 已重载。 返回表示此属性 (Property) 的 get 访问器的 MethodInfo。 | |
GetHashCode | 用作特定类型的哈希函数。GetHashCode 适合在哈希算法和数据结构(如哈希表)中使用。 (从 Object 继承。) | |
GetIndexParameters | 当在派生类中重写时,返回此属性 (Property) 的所有索引参数的数组。 | |
GetOptionalCustomModifiers | 返回一个类型数组,其中的类型表示属性 (Property) 的可选自定义修饰符。 | |
GetRawConstantValue | 由编译器返回与属性 (Property) 关联的文本值。 | |
GetRequiredCustomModifiers | 返回一个类型数组,其中的类型表示属性 (Property) 的必需自定义修饰符。 | |
GetSetMethod | 已重载。 返回表示此属性 (Property) 的 set 访问器的 MethodInfo。 | |
GetType | 获取当前实例的 Type。 (从 Object 继承。) | |
GetValue | 已重载。 返回属性的值。 | |
IsDefined | 在派生类中被重写时,指示是否 attributeType 的一个或多个实例应用于此成员。 (从 MemberInfo 继承。) | |
ReferenceEquals | 确定指定的 Object 实例是否是相同的实例。 (从 Object 继承。) | |
SetValue | 已重载。 将给定对象的属性 (Property) 值设置为给定值。 | |
ToString | 返回表示当前 Object 的 String。 (从 Object 继承。) |
页首
受保护的方法
名称 | 说明 | |
---|---|---|
Finalize | 允许 Object 在“垃圾回收”回收 Object 之前尝试释放资源并执行其他清理操作。 (从 Object 继承。) | |
MemberwiseClone | 创建当前 Object 的浅表副本。 (从 Object 继承。) |
页首
显式接口实现
名称 | 说明 | |
---|---|---|
System.Runtime.InteropServices._PropertyInfo.GetIDsOfNames | 将一组名称映射为对应的一组调度标识符。 | |
System.Runtime.InteropServices._PropertyInfo.GetType | 获取一个表示 PropertyInfo 类型的 Type 对象。 | |
System.Runtime.InteropServices._PropertyInfo.GetTypeInfo | 检索对象的类型信息,然后可以使用该信息获取接口的类型信息。 | |
System.Runtime.InteropServices._PropertyInfo.GetTypeInfoCount | 检索对象提供的类型信息接口的数量(0 或 1)。 | |
System.Runtime.InteropServices._PropertyInfo.Invoke | 提供对某一对象公开的属性 (Property) 和方法的访问。 |
页首