Monday, 7 September 2015

C# Primitive Data Types

C# Primitive Data Types.


primitive type is a data type in c# language which is understandable by the C# compiler . in C# int , string , float etc... data types are considered as primitive types . during compilation usually primitive types are converted into MSIL types.
Ex: if you write int x=20 ; in C# language during compilation the code is converted as shown below .
Int32 x=20;
Note: Int32 is MSIL equivalent for int primitive type . question copied from below weblink .




C# PRIMITIVE TYPE
FCL DATA TYPE
DESCRIPTION
object
System.Object
Ultimate base type of all other types.
string
System.String
A sequence of Unicode characters.
decimal
System.Decimal
Precise decimal with 28 significant digits.
bool
System.Boolean
A value represented as true or false.
char
System.Char
A 16-bit Unicode character.
byte
System.Byte
8-bit unsigned integral type.
sbyte
System.SByte
8-bit signed integral type.
short
System.Int16
16-bit signed integral type.
int
System.Int32
32-bit signed integral type.
long
System.Int64
64-bit signed integral type.
ushort
System.UInt16
16-bit unsigned integral type.
uint
System.UInt32
32-bit unsigned integral type.
ulong
System.UIint64
64-bit unsigned integral type.
single (float)
System.Single
Single-precision floating-point type.
double
System.Double
Double-precision floating-point type.

No comments:

Post a Comment