GetValue Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

When overridden in a derived class, returns the value of a field supported by a given object.

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

virtual Object^ GetValue(
	Object^ obj
) abstract


Type: System..::..Object
The object whose field value will be returned.

Return Value

Type: System..::..Object
An object containing the value of the field reflected by this instance.

If the field is static, obj is ignored. For non-static fields, obj should be an instance of a class that inherits or declares the field. Note that the return type of GetValue is Object. For example, if the field holds a Boolean primitive value, an instance of Object with the appropriate Boolean value is returned. Before returning the value, GetValue checks to see if the user has access permission.