Class.IsPrimitive Property

Definition

Determines if the specified Class object represents a primitive type.

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

Property Value

true if and only if this class represents a primitive type

Implements

Attributes

Remarks

Determines if the specified Class object represents a primitive type.

There are nine predefined Class objects to represent the eight primitive types and void. These are created by the Java Virtual Machine, and have the same names as the primitive types that they represent, namely boolean, byte, char, short, int, long, float, and double.

These objects may only be accessed via the following public static final variables, and are the only Class objects for which this method returns true.

Added in 1.1.

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

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