mscorlib(4.0.0.0) API with additions
System.Reflection.PropertyInfo Class Referenceabstract

Discovers the attributes of a property and provides access to property metadata. More...

Inheritance diagram for System.Reflection.PropertyInfo:
[legend]
Collaboration diagram for System.Reflection.PropertyInfo:
[legend]

Public Member Functions

override bool Equals (object obj)
 Returns a value that indicates whether this instance is equal to a specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
virtual object GetConstantValue ()
 Returns a literal value associated with the property by a compiler. More...
 
virtual object GetRawConstantValue ()
 Returns a literal value associated with the property by a compiler. More...
 
abstract void SetValue (object obj, object value, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
 When overridden in a derived class, sets the property value for a specified object that has the specified binding, index, and culture-specific information. More...
 
abstract MethodInfo [] GetAccessors (bool nonPublic)
 Returns an array whose elements reflect the public and, if specified, non-public get and set accessors of the property reflected by the current instance. More...
 
abstract MethodInfo GetGetMethod (bool nonPublic)
 When overridden in a derived class, returns the public or non-public get accessor for this property. More...
 
abstract MethodInfo GetSetMethod (bool nonPublic)
 When overridden in a derived class, returns the set accessor for this property. More...
 
abstract ParameterInfo [] GetIndexParameters ()
 When overridden in a derived class, returns an array of all the index parameters for the property. More...
 
object GetValue (object obj)
 Returns the property value of a specified object. More...
 
virtual object GetValue (object obj, object[] index)
 Returns the property value of a specified object with optional index values for indexed properties. More...
 
abstract object GetValue (object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture)
 When overridden in a derived class, returns the property value of a specified object that has the specified binding, index, and culture-specific information. More...
 
void SetValue (object obj, object value)
 Sets the property value of a specified object. More...
 
virtual void SetValue (object obj, object value, object[] index)
 Sets the property value of a specified object with optional index values for index properties. More...
 
virtual Type [] GetRequiredCustomModifiers ()
 Returns an array of types representing the required custom modifiers of the property. More...
 
virtual Type [] GetOptionalCustomModifiers ()
 Returns an array of types representing the optional custom modifiers of the property. More...
 
MethodInfo [] GetAccessors ()
 Returns an array whose elements reflect the public get and set accessors of the property reflected by the current instance. More...
 
MethodInfo GetGetMethod ()
 Returns the public get accessor for this property. More...
 
MethodInfo GetSetMethod ()
 Returns the public set accessor for this property. More...
 
- Public Member Functions inherited from System.Reflection.MemberInfo
abstract object [] GetCustomAttributes (bool inherit)
 When overridden in a derived class, returns an array of all custom attributes applied to this member. More...
 
abstract object [] GetCustomAttributes (Type attributeType, bool inherit)
 When overridden in a derived class, returns an array of custom attributes applied to this member and identified by T:System.Type. More...
 
abstract bool IsDefined (Type attributeType, bool inherit)
 When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member. More...
 
virtual IList< CustomAttributeDataGetCustomAttributesData ()
 Returns a list of T:System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the target member. More...
 
override bool Equals (object obj)
 Returns a value that indicates whether this instance is equal to a specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._MemberInfo
new string ToString ()
 Provides COM objects with version-independent access to the M:System.Object.ToString method. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._PropertyInfo
new string ToString ()
 Provides COM objects with version-independent access to the M:System.Object.ToString method. More...
 
object [] GetCustomAttributes (Type attributeType, bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.GetCustomAttributes(System.Type,System.Boolean) method. More...
 
object [] GetCustomAttributes (bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.GetCustomAttributes(System.Boolean) method. More...
 
bool IsDefined (Type attributeType, bool inherit)
 Provides COM objects with version-independent access to the M:System.Reflection.MemberInfo.IsDefined(System.Type,System.Boolean) method. More...
 

Static Public Member Functions

static bool operator== (PropertyInfo left, PropertyInfo right)
 Indicates whether two T:System.Reflection.PropertyInfo objects are equal. More...
 
static bool operator != (PropertyInfo left, PropertyInfo right)
 Indicates whether two T:System.Reflection.PropertyInfo objects are not equal. More...
 
- Static Public Member Functions inherited from System.Reflection.MemberInfo
static bool operator== (MemberInfo left, MemberInfo right)
 Indicates whether two T:System.Reflection.MemberInfo objects are equal. More...
 
static bool operator != (MemberInfo left, MemberInfo right)
 Indicates whether two T:System.Reflection.MemberInfo objects are not equal. More...
 

Public Attributes

override MemberTypes MemberType => MemberTypes.Property
 Gets a T:System.Reflection.MemberTypes value indicating that this member is a property. More...
 

Properties

abstract Type PropertyType [get]
 Gets the type of this property. More...
 
abstract PropertyAttributes Attributes [get]
 Gets the attributes for this property. More...
 
abstract bool CanRead [get]
 Gets a value indicating whether the property can be read. More...
 
abstract bool CanWrite [get]
 Gets a value indicating whether the property can be written to. More...
 
virtual MethodInfo GetMethod [get]
 Gets the get accessor for this property. More...
 
virtual MethodInfo SetMethod [get]
 Gets the set accessor for this property. More...
 
bool IsSpecialName [get]
 Gets a value indicating whether the property is the special name. More...
 
- Properties inherited from System.Reflection.MemberInfo
abstract MemberTypes MemberType [get]
 When overridden in a derived class, gets a T:System.Reflection.MemberTypes value indicating the type of the member — method, constructor, event, and so on. More...
 
abstract string Name [get]
 Gets the name of the current member. More...
 
abstract Type DeclaringType [get]
 Gets the class that declares this member. More...
 
abstract Type ReflectedType [get]
 Gets the class object that was used to obtain this instance of MemberInfo. More...
 
virtual IEnumerable< CustomAttributeDataCustomAttributes [get]
 Gets a collection that contains this member's custom attributes. More...
 
virtual int MetadataToken [get]
 Gets a value that identifies a metadata element. More...
 
virtual Module Module [get]
 Gets the module in which the type that declares the member represented by the current T:System.Reflection.MemberInfo is defined. More...
 
- Properties inherited from System.Runtime.InteropServices._MemberInfo
MemberTypes MemberType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.MemberType property. More...
 
string Name [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.Name property. More...
 
Type DeclaringType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.DeclaringType property. More...
 
Type ReflectedType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.ReflectedType property. More...
 
- Properties inherited from System.Runtime.InteropServices._PropertyInfo
MemberTypes MemberType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.MemberType property. More...
 
string Name [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.Name property. More...
 
Type DeclaringType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.DeclaringType property. More...
 
Type ReflectedType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.MemberInfo.ReflectedType property. More...
 
Type PropertyType [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.PropertyType property. More...
 
PropertyAttributes Attributes [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.Attributes property. More...
 
bool CanRead [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.CanRead property. More...
 
bool CanWrite [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.CanWrite property. More...
 
bool IsSpecialName [get]
 Provides COM objects with version-independent access to the P:System.Reflection.PropertyInfo.IsSpecialName property. More...
 

Detailed Description

Discovers the attributes of a property and provides access to property metadata.

Definition at line 15 of file PropertyInfo.cs.

Member Function Documentation

◆ Equals()

override bool System.Reflection.PropertyInfo.Equals ( object  obj)

Returns a value that indicates whether this instance is equal to a specified object.

Parameters
objAn object to compare with this instance, or null.
Returns
true if obj equals the type and value of this instance; otherwise, false.

Implements System.Runtime.InteropServices._PropertyInfo.

Definition at line 131 of file PropertyInfo.cs.

◆ GetAccessors() [1/2]

abstract MethodInfo [] System.Reflection.PropertyInfo.GetAccessors ( bool  nonPublic)
pure virtual

Returns an array whose elements reflect the public and, if specified, non-public get and set accessors of the property reflected by the current instance.

Parameters
nonPublicIndicates whether non-public methods should be returned in the returned array. true if non-public methods are to be included; otherwise, false.
Returns
An array whose elements reflect the get and set accessors of the property reflected by the current instance. If nonPublic is true, this array contains public and non-public get and set accessors. If nonPublic is false, this array contains only public get and set accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ GetAccessors() [2/2]

MethodInfo [] System.Reflection.PropertyInfo.GetAccessors ( )

Returns an array whose elements reflect the public get and set accessors of the property reflected by the current instance.

Returns
An array of T:System.Reflection.MethodInfo objects that reflect the public get and set accessors of the property reflected by the current instance, if found; otherwise, this method returns an array with zero (0) elements.

Implements System.Runtime.InteropServices._PropertyInfo.

Definition at line 307 of file PropertyInfo.cs.

◆ GetConstantValue()

virtual object System.Reflection.PropertyInfo.GetConstantValue ( )
virtual

Returns a literal value associated with the property by a compiler.

Returns
An T:System.Object that contains the literal value associated with the property. If the literal value is a class type with an element value of zero, the return value is null.
Exceptions
T:System.InvalidOperationExceptionThe Constant table in unmanaged metadata does not contain a constant value for the current property.
T:System.FormatExceptionThe type of the value is not one of the types permitted by the Common Language Specification (CLS). See the ECMA Partition II specification, Metadata.

Definition at line 149 of file PropertyInfo.cs.

◆ GetGetMethod() [1/2]

abstract MethodInfo System.Reflection.PropertyInfo.GetGetMethod ( bool  nonPublic)
pure virtual

When overridden in a derived class, returns the public or non-public get accessor for this property.

Parameters
nonPublicIndicates whether a non-public get accessor should be returned. true if a non-public accessor is to be returned; otherwise, false.
Returns
A MethodInfo object representing the get accessor for this property, if nonPublic is true. Returns null if nonPublic is false and the get accessor is non-public, or if nonPublic is true but no get accessors exist.
Exceptions
T:System.Security.SecurityExceptionThe requested method is non-public and the caller does not have T:System.Security.Permissions.ReflectionPermission to reflect on this non-public method.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ GetGetMethod() [2/2]

MethodInfo System.Reflection.PropertyInfo.GetGetMethod ( )

Returns the public get accessor for this property.

Returns
A MethodInfo object representing the public get accessor for this property, or null if the get accessor is non-public or does not exist.

Implements System.Runtime.InteropServices._PropertyInfo.

Definition at line 315 of file PropertyInfo.cs.

◆ GetHashCode()

override int System.Reflection.PropertyInfo.GetHashCode ( )

Returns the hash code for this instance.

Returns
A 32-bit signed integer hash code.

Implements System.Runtime.InteropServices._PropertyInfo.

Definition at line 139 of file PropertyInfo.cs.

◆ GetIndexParameters()

abstract ParameterInfo [] System.Reflection.PropertyInfo.GetIndexParameters ( )
pure virtual

When overridden in a derived class, returns an array of all the index parameters for the property.

Returns
An array of type ParameterInfo containing the parameters for the indexes. If the property is not indexed, the array has 0 (zero) elements.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ GetOptionalCustomModifiers()

virtual Type [] System.Reflection.PropertyInfo.GetOptionalCustomModifiers ( )
virtual

Returns an array of types representing the optional custom modifiers of the property.

Returns
An array of T:System.Type objects that identify the optional custom modifiers of the current property, such as T:System.Runtime.CompilerServices.IsConst or T:System.Runtime.CompilerServices.IsImplicitlyDereferenced.

Definition at line 299 of file PropertyInfo.cs.

◆ GetRawConstantValue()

virtual object System.Reflection.PropertyInfo.GetRawConstantValue ( )
virtual

Returns a literal value associated with the property by a compiler.

Returns
An T:System.Object that contains the literal value associated with the property. If the literal value is a class type with an element value of zero, the return value is null.
Exceptions
T:System.InvalidOperationExceptionThe Constant table in unmanaged metadata does not contain a constant value for the current property.
T:System.FormatExceptionThe type of the value is not one of the types permitted by the Common Language Specification (CLS). See the ECMA Partition II specification, Metadata Logical Format: Other Structures, Element Types used in Signatures.

Definition at line 158 of file PropertyInfo.cs.

◆ GetRequiredCustomModifiers()

virtual Type [] System.Reflection.PropertyInfo.GetRequiredCustomModifiers ( )
virtual

Returns an array of types representing the required custom modifiers of the property.

Returns
An array of T:System.Type objects that identify the required custom modifiers of the current property, such as T:System.Runtime.CompilerServices.IsConst or T:System.Runtime.CompilerServices.IsImplicitlyDereferenced.

Definition at line 292 of file PropertyInfo.cs.

◆ GetSetMethod() [1/2]

abstract MethodInfo System.Reflection.PropertyInfo.GetSetMethod ( bool  nonPublic)
pure virtual

When overridden in a derived class, returns the set accessor for this property.

Parameters
nonPublicIndicates whether the accessor should be returned if it is non-public. true if a non-public accessor is to be returned; otherwise, false.
Returns

This property's Set method, or null, as shown in the following table.Value Condition The Set method for this property. The set accessor is public.-or- nonPublic is true and the set accessor is non-public. null

nonPublic is true, but the property is read-only.-or- nonPublic is false and the set accessor is non-public.-or- There is no set accessor.

Exceptions
T:System.Security.SecurityExceptionThe requested method is non-public and the caller does not have T:System.Security.Permissions.ReflectionPermission to reflect on this non-public method.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ GetSetMethod() [2/2]

MethodInfo System.Reflection.PropertyInfo.GetSetMethod ( )

Returns the public set accessor for this property.

Returns
The MethodInfo object representing the Set method for this property if the set accessor is public, or null if the set accessor is not public.

Implements System.Runtime.InteropServices._PropertyInfo.

Definition at line 323 of file PropertyInfo.cs.

◆ GetValue() [1/3]

object System.Reflection.PropertyInfo.GetValue ( object  obj)

Returns the property value of a specified object.

Parameters
objThe object whose property value will be returned.
Returns
The property value of the specified object.

Definition at line 214 of file PropertyInfo.cs.

◆ GetValue() [2/3]

virtual object System.Reflection.PropertyInfo.GetValue ( object  obj,
object []  index 
)
virtual

Returns the property value of a specified object with optional index values for indexed properties.

Parameters
objThe object whose property value will be returned.
indexOptional index values for indexed properties. The indexes of indexed properties are zero-based. This value should be null for non-indexed properties.
Returns
The property value of the specified object.
Exceptions
T:System.ArgumentExceptionThe index array does not contain the type of arguments needed.-or- The property's get accessor is not found.
T:System.Reflection.TargetExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch T:System.Exception instead.The object does not match the target type, or a property is an instance property but obj is null.
T:System.Reflection.TargetParameterCountExceptionThe number of parameters in index does not match the number of parameters the indexed property takes.
T:System.MethodAccessExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.There was an illegal attempt to access a private or protected method inside a class.
T:System.Reflection.TargetInvocationExceptionAn error occurred while retrieving the property value. For example, an index value specified for an indexed property is out of range. The P:System.Exception.InnerException property indicates the reason for the error.

Implements System.Runtime.InteropServices._PropertyInfo.

Reimplemented in System.Reflection.Emit.PropertyBuilder.

Definition at line 233 of file PropertyInfo.cs.

◆ GetValue() [3/3]

abstract object System.Reflection.PropertyInfo.GetValue ( object  obj,
BindingFlags  invokeAttr,
Binder  binder,
object []  index,
CultureInfo  culture 
)
pure virtual

When overridden in a derived class, returns the property value of a specified object that has the specified binding, index, and culture-specific information.

Parameters
objThe object whose property value will be returned.
invokeAttrA bitwise combination of the following enumeration members that specify the invocation attribute: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, and SetProperty. You must specify a suitable invocation attribute. For example, to invoke a static member, set the Static flag.
binderAn object that enables the binding, coercion of argument types, invocation of members, and retrieval of T:System.Reflection.MemberInfo objects through reflection. If binder is null, the default binder is used.
indexOptional index values for indexed properties. This value should be null for non-indexed properties.
cultureThe culture for which the resource is to be localized. If the resource is not localized for this culture, the P:System.Globalization.CultureInfo.Parent property will be called successively in search of a match. If this value is null, the culture-specific information is obtained from the P:System.Globalization.CultureInfo.CurrentUICulture property.
Returns
The property value of the specified object.
Exceptions
T:System.ArgumentExceptionThe index array does not contain the type of arguments needed.-or- The property's get accessor is not found.
T:System.Reflection.TargetExceptionThe object does not match the target type, or a property is an instance property but obj is null.
T:System.Reflection.TargetParameterCountExceptionThe number of parameters in index does not match the number of parameters the indexed property takes.
T:System.MethodAccessExceptionThere was an illegal attempt to access a private or protected method inside a class.
T:System.Reflection.TargetInvocationExceptionAn error occurred while retrieving the property value. For example, an index value specified for an indexed property is out of range. The P:System.Exception.InnerException property indicates the reason for the error.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ operator !=()

static bool System.Reflection.PropertyInfo.operator != ( PropertyInfo  left,
PropertyInfo  right 
)
static

Indicates whether two T:System.Reflection.PropertyInfo objects are not equal.

Parameters
leftThe first object to compare.
rightThe second object to compare.
Returns
true if left is not equal to right ; otherwise, false.

Definition at line 121 of file PropertyInfo.cs.

◆ operator==()

static bool System.Reflection.PropertyInfo.operator== ( PropertyInfo  left,
PropertyInfo  right 
)
static

Indicates whether two T:System.Reflection.PropertyInfo objects are equal.

Parameters
leftThe first object to compare.
rightThe second object to compare.
Returns
true if left is equal to right ; otherwise, false.

Definition at line 102 of file PropertyInfo.cs.

◆ SetValue() [1/3]

abstract void System.Reflection.PropertyInfo.SetValue ( object  obj,
object  value,
BindingFlags  invokeAttr,
Binder  binder,
object []  index,
CultureInfo  culture 
)
pure virtual

When overridden in a derived class, sets the property value for a specified object that has the specified binding, index, and culture-specific information.

Parameters
objThe object whose property value will be set.
valueThe new property value.
invokeAttrA bitwise combination of the following enumeration members that specify the invocation attribute: InvokeMethod, CreateInstance, Static, GetField, SetField, GetProperty, or SetProperty. You must specify a suitable invocation attribute. For example, to invoke a static member, set the Static flag.
binderAn object that enables the binding, coercion of argument types, invocation of members, and retrieval of T:System.Reflection.MemberInfo objects through reflection. If binder is null, the default binder is used.
indexOptional index values for indexed properties. This value should be null for non-indexed properties.
cultureThe culture for which the resource is to be localized. If the resource is not localized for this culture, the P:System.Globalization.CultureInfo.Parent property will be called successively in search of a match. If this value is null, the culture-specific information is obtained from the P:System.Globalization.CultureInfo.CurrentUICulture property.
Exceptions
T:System.ArgumentExceptionThe index array does not contain the type of arguments needed.-or- The property's set accessor is not found. -or- value cannot be converted to the type of P:System.Reflection.PropertyInfo.PropertyType.
T:System.Reflection.TargetExceptionThe object does not match the target type, or a property is an instance property but obj is null.
T:System.Reflection.TargetParameterCountExceptionThe number of parameters in index does not match the number of parameters the indexed property takes.
T:System.MethodAccessExceptionThere was an illegal attempt to access a private or protected method inside a class.
T:System.Reflection.TargetInvocationExceptionAn error occurred while setting the property value. For example, an index value specified for an indexed property is out of range. The P:System.Exception.InnerException property indicates the reason for the error.

Implements System.Runtime.InteropServices._PropertyInfo.

Implemented in System.Reflection.Emit.PropertyBuilder.

◆ SetValue() [2/3]

void System.Reflection.PropertyInfo.SetValue ( object  obj,
object  value 
)

Sets the property value of a specified object.

Parameters
objThe object whose property value will be set.
valueThe new property value.
Exceptions
T:System.ArgumentExceptionThe property's set accessor is not found. -or- value cannot be converted to the type of P:System.Reflection.PropertyInfo.PropertyType.
T:System.Reflection.TargetExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch T:System.Exception instead.The type of obj does not match the target type, or a property is an instance property but obj is null.
T:System.MethodAccessExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.There was an illegal attempt to access a private or protected method inside a class.
T:System.Reflection.TargetInvocationExceptionAn error occurred while setting the property value. The P:System.Exception.InnerException property indicates the reason for the error.

Definition at line 265 of file PropertyInfo.cs.

◆ SetValue() [3/3]

virtual void System.Reflection.PropertyInfo.SetValue ( object  obj,
object  value,
object []  index 
)
virtual

Sets the property value of a specified object with optional index values for index properties.

Parameters
objThe object whose property value will be set.
valueThe new property value.
indexOptional index values for indexed properties. This value should be null for non-indexed properties.
Exceptions
T:System.ArgumentExceptionThe index array does not contain the type of arguments needed.-or- The property's set accessor is not found. -or- value cannot be converted to the type of P:System.Reflection.PropertyInfo.PropertyType.
T:System.Reflection.TargetExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch T:System.Exception instead.The object does not match the target type, or a property is an instance property but obj is null.
T:System.Reflection.TargetParameterCountExceptionThe number of parameters in index does not match the number of parameters the indexed property takes.
T:System.MethodAccessExceptionIn the .NET for Windows Store apps or the Portable Class Library, catch the base class exception, T:System.MemberAccessException, instead.There was an illegal attempt to access a private or protected method inside a class.
T:System.Reflection.TargetInvocationExceptionAn error occurred while setting the property value. For example, an index value specified for an indexed property is out of range. The P:System.Exception.InnerException property indicates the reason for the error.

Implements System.Runtime.InteropServices._PropertyInfo.

Reimplemented in System.Reflection.Emit.PropertyBuilder.

Definition at line 285 of file PropertyInfo.cs.

Member Data Documentation

◆ MemberType

override MemberTypes System.Reflection.PropertyInfo.MemberType => MemberTypes.Property

Gets a T:System.Reflection.MemberTypes value indicating that this member is a property.

Returns
A T:System.Reflection.MemberTypes value indicating that this member is a property.

Definition at line 19 of file PropertyInfo.cs.

Property Documentation

◆ Attributes

abstract PropertyAttributes System.Reflection.PropertyInfo.Attributes
get

Gets the attributes for this property.

Returns
The attributes of this property.

Definition at line 34 of file PropertyInfo.cs.

◆ CanRead

abstract bool System.Reflection.PropertyInfo.CanRead
get

Gets a value indicating whether the property can be read.

Returns
true if this property can be read; otherwise, false.

Definition at line 44 of file PropertyInfo.cs.

◆ CanWrite

abstract bool System.Reflection.PropertyInfo.CanWrite
get

Gets a value indicating whether the property can be written to.

Returns
true if this property can be written to; otherwise, false.

Definition at line 54 of file PropertyInfo.cs.

◆ GetMethod

virtual MethodInfo System.Reflection.PropertyInfo.GetMethod
get

Gets the get accessor for this property.

Returns
The get accessor for this property.

Definition at line 63 of file PropertyInfo.cs.

◆ IsSpecialName

bool System.Reflection.PropertyInfo.IsSpecialName
get

Gets a value indicating whether the property is the special name.

Returns
true if this property is the special name; otherwise, false.

Definition at line 88 of file PropertyInfo.cs.

◆ PropertyType

abstract Type System.Reflection.PropertyInfo.PropertyType
get

Gets the type of this property.

Returns
The type of this property.

Definition at line 25 of file PropertyInfo.cs.

◆ SetMethod

virtual MethodInfo System.Reflection.PropertyInfo.SetMethod
get

Gets the set accessor for this property.

Returns
The set accessor for this property, or null if the property is read-only.

Definition at line 75 of file PropertyInfo.cs.


The documentation for this class was generated from the following file: