System.Type.IsPrimitive Property

Gets a value indicating whether the Type is one of the primitive types.

Syntax

public bool IsPrimitive { get; }

Value

true if the Type is one of the primitive types; otherwise, false.

Remarks

The primitive types are bool, byte, sbyte, short, ushort, int, uint, long, ulong, IntPtr, UIntPtr, char, double, and float.

If the current Type represents a generic type, or a type parameter in the definition of a generic type or generic method, this property always returns false.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0