System.Reflection.Emit.PropertyBuilder.GetValue Method

Gets the value of the indexed property by calling the property's getter method.

Syntax

public override object GetValue (object obj, object[] index)

Parameters

obj
The object whose property value will be returned.
index
Optional index values for indexed properties. This value should be null for non-indexed properties.

Returns

The value of the specified indexed property.

Remarks

To get the value of a property, reflect on the property's parent type using Type.GetType or Assembly.GetType, retrieve the Reflection property object from the type, and call PropertyInfo.GetValue.

Requirements

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