Java.Lang.Reflect.Field.Get Method
Returns the value of the field in the specified object.

Syntax

[Android.Runtime.Register("get", "(Ljava/lang/Object;)Ljava/lang/Object;", "")]
public Java.Lang.Object Get (Java.Lang.Object object)

Parameters

object
the object to access

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.NullPointerExceptionif the object is null and the field is non-static
Java.Lang.IllegalArgumentExceptionif the object is not compatible with the declaring class
Java.Lang.IllegalAccessExceptionif this field is not accessible

Remarks

Returns the value of the field in the specified object. This reproduces the effect of object.fieldName

If the type of this field is a primitive type, the field value is automatically boxed.

If this field is static, the object argument is ignored. Otherwise, if the object is null, a NullPointerException is thrown. If the object is not an instance of the declaring class of the method, an IllegalArgumentException is thrown.

If this Field object is enforcing access control (see AccessibleObject) and this field is not accessible from the current context, an IllegalAccessException is thrown.

[Android Documentation]

Requirements

Namespace: Java.Lang.Reflect
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1