Data Type Hierarchy

All types in .NET inherit from another type, except for System.Object (object), which is at the top of the class hierarchy.
Each type is one of:
  • A built-in type
    • Part of the Common Type System (CTS)
    • Available in C# using a keyword for the type, e.g. intfloatstringarrayobject
  • A custom type
    • Defined in the .NET Framework class library
  • A user-defined type
    • You define in your code
Here is the class hierarchy for all types.  Indentation indicates that a class derives from class listed above it.  Parentheses indicate C# keywords for built-in types.


  • System.Object  (object)
    • System.ValueType
      • System.Enum
        • user-defined enum types
      • System.Boolean  (bool)
      • System.Byte  (byte)
      • System.SByte  (sbyte)
      • System.Int16  (short)
      • System.UInt16  (ushort)
      • System.Int32  (int)
      • System.UInt32  (uint)
      • System.Int64  (long)
      • System.UInt64  (ulong)
      • System.Single  (float)
      • System.Double  (double)
      • System.Decimal  (decimal)
      • System.Char  (char)
      • System.Void  (void)
      • System.DateTime
      • System.Guid
      • System.TimeSpan
      • System.IntPtr
      • System.UIntPtr
      • user-defined struct types
    • System.String  (string)
    • System.Array  (array)
    • System.Type
    • System.Delegate
      • System.MulticastDelegate  (delegate)
    • custom types in .NET Framework
    • user-defined types
    • boxed value types