Udostępnij za pośrednictwem


Class.GetEnumConstants Method

Definition

Returns the elements of this enum class or null if this Class object does not represent an enum type.

[Android.Runtime.Register("getEnumConstants", "()[Ljava/lang/Object;", "")]
public Java.Lang.Object[]? GetEnumConstants ();
[<Android.Runtime.Register("getEnumConstants", "()[Ljava/lang/Object;", "")>]
member this.GetEnumConstants : unit -> Java.Lang.Object[]

Returns

Object[]

an array containing the values comprising the enum class represented by this Class object in the order they're declared, or null if this Class object does not represent an enum type

Attributes

Remarks

Returns the elements of this enum class or null if this Class object does not represent an enum type.

Added in 1.5.

Java documentation for java.lang.Class.getEnumConstants().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to