Data Types and information about them. - CSharp Language Basics

CSharp examples for Language Basics:Data Type

Introduction

C# Data NET Data Size Low High
TypeType in Bytes Value Value
sbyte System.Sbyte 1 -128127
byteSystem.Byte 1 0 255
short System.Int16 2 -32,76832,767
ushort System.UInt162 0 65,535
int System.Int32 4 -2,147,483,648 2,147,483,647
uintSystem.UInt324 0 4,294,967,295
longSystem.Int64 8 -9,223,372,036,854,775,808 9,223,372,036,854,775,807
ulong System.UInt648 0 18,446,744,073,709,551,615
charSystem.Char 2 0 65,535
float System.Single4 1.5x10 ^ -453.4x10 ^ 38
double System.Double8 5.0x10 ^ -3241.7x10 ^ 308
boolSystem.Boolean 1 false (0) true (1)
decimal System.Decimal 16 1.0x10 ^ -28approx. 7.9x10 ^ 28

Related Tutorials