Click or drag to resize
PropertyInfo Class
Discovers the attributes of a property and provides access to property metadata.
Inheritance Hierarchy

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
[SerializableAttribute]
public abstract class PropertyInfo : MemberInfo, 
	_PropertyInfo

The PropertyInfo type exposes the following members.

Methods
  NameDescription
Public methodEquals
Returns a value that indicates whether this instance is equal to a specified object.
(Overrides MemberInfoEquals(Object).)
Public methodGetAccessors
Returns an array whose elements reflect the public get, set, and other accessors of the property reflected by the current instance.
Public methodGetAccessors(Boolean)
Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the property reflected by the current instance.
Public methodGetGetMethod
Returns the public get accessor for this property.
Public methodGetGetMethod(Boolean)
When overridden in a derived class, returns the public or non-public get accessor for this property.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides MemberInfoGetHashCode.)
Public methodGetIndexParameters
When overridden in a derived class, returns an array of all the index parameters for the property.
Public methodGetSetMethod
Returns the public set accessor for this property.
Public methodGetSetMethod(Boolean)
When overridden in a derived class, returns the set accessor for this property.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(Object, Object)
Returns the value of the property with optional index values for indexed properties.
Public methodGetValue(Object, BindingFlags, Binder, Object, CultureInfo)
When overridden in a derived class, returns the value of a property having the specified binding, index, and CultureInfo.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetValue(Object, Object, Object)
Sets the value of the property with optional index values for index properties.
Public methodSetValue(Object, Object, BindingFlags, Binder, Object, CultureInfo)
When overridden in a derived class, sets the property value for the given object to the given value.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Indicates whether two PropertyInfo objects are equal.
Public operatorStatic memberInequality
Indicates whether two PropertyInfo objects are not equal.
Top
Properties
  NameDescription
Public propertyCanRead
Gets a value indicating whether the property can be read.
Public propertyCanWrite
Gets a value indicating whether the property can be written to.
Public propertyName
Gets the name of the current member.
(Inherited from MemberInfo.)
Public propertyPropertyType
Gets the type of this property.
Top
See Also