PostSharpAPI ReferencePost­Sharp.​ReflectionLocation­InfoSet­Value
Open sandboxFocus

LocationInfo.SetValue Method

SetValue(Object, Object)

Sets the value of the field or property represented by the current object to a given value.

Declaration
public void SetValue(object instance, object value)
Parameters
Type Name Description
Object instance

The object whose field or property value will be changed (null if the field or property is static).

Object value

New value.

SetValue(Object, Object, Object[])

Sets the value of the field or property represented by the current object to a given value with optional index values for indexed properties.

Declaration
public void SetValue(object instance, object value, object[] index)
Parameters
Type Name Description
Object instance

The object whose field or property value will be changed (null if the field or property is static).

Object value

New value.

Object[] index

Optional index values for indexed properties. null for fields or non-index properties.