The data types which are directly supported by compiler are called as the primitive datatypes. These are directly mapped to the type from base class library, you don't need to call new of that data type to create a new primitive object.
E.g int I = 10;
Defines an integer and map int to System.Int32
Declaration of primitive types makes code more readable compared to other types.
Following are the primitive types defined in .NET
- Sbyte
- Byte
- Short
- Ushort
- Int
- Uint
- Long
- Ulong
- Char
- Float
- Double
- Bool
- Decimal
- Object
- String
No comments:
Post a Comment