Class.IsEnum Property

Definition

Returns true if and only if this class was declared as an enum in the source code.

public bool IsEnum { [Android.Runtime.Register("isEnum", "()Z", "")] get; }
[<get: Android.Runtime.Register("isEnum", "()Z", "")>]
member this.IsEnum : bool

Property Value

true if and only if this class was declared as an enum in the source code

Attributes

Remarks

Returns true if and only if this class was declared as an enum in the source code.

Note that java.lang.Enum is not itself an enum class.

Also note that if an enum constant is declared with a class body, the class of that enum constant object is an anonymous class and <em>not</em> the class of the declaring enum class. The Enum#getDeclaringClass method of an enum constant can be used to get the class of the enum class declaring the constant.

Added in 1.5.

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

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