System.Reflection.Emit.PropertyBuilder.SetValue Method

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

Syntax

public override void SetValue (object obj, object value, object[] index)

Parameters

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

Remarks

To set the value of a property, reflect on the property's parent type using erload:System.Type.GetType or erload:System.Reflection.Assembly.GetType, retrieve the System.Reflection.PropertyInfo object from the type, and call erload:System.Reflection.PropertyInfo.SetValue.

Requirements

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