Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Type Basics > Predefined Type Taxonomy

Predefined Type Taxonomy

The predefined types in C# are:

Value types
  • Numeric

    • Signed integer (sbyte, short, int, long)

    • Unsigned integer (byte, ushort, uint, ulong)

    • Real number (float, double, decimal)

  • Logical (bool)

  • Character (char)

Reference types
  • String (string)

  • Object (object)

Predefined types in C# alias Framework types in the System namespace. There is only a syntactic difference between these two statements:

int i = 5;
System.Int32 i = 5;

The set of predefined value types excluding decimal are known as primitive types in the Common Language Runtime (CLR). Primitive types are so called because they are supported directly via instructions in compiled code, which usually translates to direct support on the underlying processor.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial