PropertyBuilder::SetValue Method (Object^, Object^, array<Object^>^)

 

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

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

public:
virtual void SetValue(
	Object^ obj,
	Object^ value,
	array<Object^>^ index
) override

Parameters

obj
Type: System::Object^

The object whose property value will be set.

value
Type: System::Object^

The new value for this property.

index
Type: array<System::Object^>^

Optional index values for indexed properties. This value should be null for non-indexed properties.

Exception Condition
NotSupportedException

This method is not supported.

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

.NET Framework
Available since 1.1
Silverlight
Available since 2.0
Return to top
Show: