Android Guides | Samples

Java.Lang.Class.GetField Method

Returns a Field object which represents the public field with the given name.

Syntax

[Android.Runtime.Register("getField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", "")]
public Field GetField (String name)

See Also

Parameters

name

Exceptions

TypeReason
NoSuchFieldExceptionif the field cannot be found.

Remarks

Returns a Field object which represents the public field with the given name. This method first searches the class C represented by this Class, then the interfaces implemented by C and finally the superclasses of C.

[Android Documentation]

Requirements

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