Android Guides | Samples

Java.Lang.Class.GetFields Method

Returns an array containing Field objects for all public fields for the class C represented by this Class.

Syntax

[Android.Runtime.Register("getFields", "()[Ljava/lang/reflect/Field;", "")]
public Field[] GetFields ()

See Also

Remarks

Returns an array containing Field objects for all public fields for the class C represented by this Class. Fields may be declared in C, the interfaces it implements or in the superclasses of C. The elements in the returned array are in no particular order.

If there are no public fields or if this class represents an array class, a primitive type or void then an empty array is returned.

[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