Open sandboxFocus

Method GetValue

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.