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

LocationInfo.GetValue Method

GetValue(Object)

Returns the value of the field or property represented by the current object.

Declaration
public object GetValue(object instance)
Parameters
Type Name Description
Object instance

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

Returns
Type Description
Object

The value of the field or property.

GetValue(Object, Object[])

Returns the value of the field or property represented by the current object with optional index values for indexed properties.

Declaration
public object GetValue(object instance, object[] index)
Parameters
Type Name Description
Object instance

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

Object[] index

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

Returns
Type Description
Object

The value of the field or property.