Interface
PropertyInfo
sealed interface PropertyInfo
Module: System.Introspection
Assembly: System.Runtime.dll
Source file: Descriptors.rvn
Inherits: MemberInfo
Closed hierarchy: only the permitted direct subtypes can extend this type.
Permitted direct subtypes: RuntimePropertyInfo
Part of closed hierarchy: MemberInfo
Describes a retained property declaration in the loaded program.
Remarks
Development after Preview 9. Object equality uses descriptor kind, closed declaring type and definition index. Repeated wrappers can compare equal; Object hashes agree and ToString returns Name, not a complete signature. This API describes metadata and does not invoke, read or write application members. See the introspection guide for query and identity limitations.
Properties
9 items
CanRead: bool
Reports whether a getter exists, including a nonpublic getter.
Defined by PropertyInfo.CanRead · Required implementation (no default).
CanWrite: bool
Reports whether a setter exists, including a nonpublic setter.
Defined by PropertyInfo.CanWrite · Required implementation (no default).
DeclaringType: Optional<TypeInfo>
Gets the declaring type, or None for a top-level member.
Inherited from MemberInfo.DeclaringType · Defined by MemberInfo.DeclaringType · Required implementation (no default).
DefinitionIndex: int
Gets the runtime definition index. This is not a metadata token or persistent ID; interpret it with the member kind and declaring type.
Defined by PropertyInfo.DefinitionIndex · Required implementation (no default).
IsStatic: bool
Reports whether the property is static.
Defined by PropertyInfo.IsStatic · Required implementation (no default).
MetadataToken: Optional<int>
Gets Some(token) for available declaration metadata, or None for a synthesized member. Tokens are scoped to their defining module.
Inherited from MemberInfo.MetadataToken · Defined by MemberInfo.MetadataToken · Required implementation (no default).
Module: Optional<ModuleInfo>
Gets Some(module) for a declared member, or None when no defining module exists.
Inherited from MemberInfo.Module · Defined by MemberInfo.Module · Required implementation (no default).
Name: string
Gets the declared or synthesized member name.
Inherited from MemberInfo.Name · Defined by MemberInfo.Name · Required implementation (no default).
PropertyType: TypeInfo
Gets the property type with declaring-type generic arguments substituted.
Defined by PropertyInfo.PropertyType · Required implementation (no default).
Methods
8 items
GetCustomAttributesData() -> Sequence<CustomAttributeData>
Gets directly declared retained attribute data without executing attribute constructors.
Inherited from MemberInfo.GetCustomAttributesData · Defined by MemberInfo.GetCustomAttributesData · Required implementation (no default).
GetGetMethod() -> Optional<MethodInfo>
Gets the property getter when public.
Defined by PropertyInfo.GetGetMethod · Required implementation (no default).
GetGetMethod(arg0: bool) -> Optional<MethodInfo>
Gets the property getter with explicit nonpublic selection.
Defined by PropertyInfo.GetGetMethod · Required implementation (no default).
GetIndexParameters() -> Sequence<ParameterInfo>
Gets the index parameters in declaration order.
Defined by PropertyInfo.GetIndexParameters · Required implementation (no default).
GetSetMethod() -> Optional<MethodInfo>
Gets the property setter when public.
Defined by PropertyInfo.GetSetMethod · Required implementation (no default).
GetSetMethod(arg0: bool) -> Optional<MethodInfo>
Gets the property setter with explicit nonpublic selection.
Defined by PropertyInfo.GetSetMethod · Required implementation (no default).
Extension member:
GetValue(receiver: object?) -> Result<object?, ReflectionError>
Invokes a public nonindexed instance getter.
Extension from PropertyReflectionExtensions.GetValue
Extension member:
SetValue(receiver: object?, value: object?) -> Result<void, ReflectionError>
Invokes a public nonindexed instance setter.
Extension from PropertyReflectionExtensions.SetValue