Udostępnij za pośrednictwem


Enum.Name Method

Definition

Returns the name of this enum constant, exactly as declared in its enum declaration.

[Android.Runtime.Register("name", "()Ljava/lang/String;", "")]
public string Name ();
[<Android.Runtime.Register("name", "()Ljava/lang/String;", "")>]
abstract member Name : unit -> string
override this.Name : unit -> string

Returns

the name of this enum constant

Attributes

Remarks

Returns the name of this enum constant, exactly as declared in its enum declaration.

<b>Most programmers should use the #toString method in preference to this one, as the toString method may return a more user-friendly name.</b> This method is designed primarily for use in specialized situations where correctness depends on getting the exact name, which will not vary from release to release.

Java documentation for java.lang.Enum.name().

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