Mono Class Library: System.Reflection.PropertyInfo Overview | Members

System.Reflection.PropertyInfo.GetValue Method

Returns the value of the property reflected by the current instance in the specified object, using the specified index values. [Edit]

[System.Diagnostics.DebuggerStepThrough]
public virtual object GetValue (object obj, object[] index)

Parameters

obj
The object whose property value will be returned. Specify null to invoke a static Get accessor of a property. [Edit]
index
An array of objects that is an index of values for indexed properties. This value is required to be null for non-indexed properties. [Edit]
index
Documentation for this section has not yet been entered. [Edit]

Returns

A object that contains the property value for obj . [Edit]

Permissions

TypeReason
System.Security.Permissions.ReflectionPermission [Edit] Requires permission to reflect non-public members of a type in loaded assemblies. See System.Security.Permissions.ReflectionPermissionFlag.MemberAccess.

Exceptions

TypeReason
ArgumentException

index does not contain the exact type of arguments needed.

-or-

The Get accessor of the property reflected by the current instance is not found.

[Edit]
MethodAccessExceptionThe Get accessor of the property reflected by the current instance is non-public and the caller does not have System.Security.Permissions.ReflectionPermission to reflect on non-public methods. [Edit]
System.Reflection.TargetExceptionThe property reflected by the current instance is non-static, and obj is null or is of a type that does not implement the property reflected by the current instance. [Edit]
System.Reflection.TargetParameterCountExceptionThe current instance reflects an indexer and index.Length does not equal the rank of the indexer. [Edit]

Remarks

Operation
As described above. [Edit]

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0