Thursday 29 June 2017

c sharp lesson-5


VARIABLE:
A variable basically denotes a memory space to store data required by an appliocation.A variable is usually declared by mentiong its data type and floowed by its name.

Syntax:

<data_type><variable name>[=initial value];

<data_type> is one of the data type supported by c sharp.<variable name> can be any valid name follows the rule of naming variable rules in c#.




Integral Types.

sbyte
byte
short
ushort
int
uint
long
ulong
char





Bool type:

A bool type variable can take one of the two boolean values true or false.

Floating point types.

Float and double are two floating point types in c#. double takes eight bytes of memory and it is accurate than float type variable because it takes only four bytes.

Decimal.

It is data type used to store very very accurate data in c#. it takes 16 bytes of memory.

---------Muthu karthikeyan,Madurai

No comments:

Post a Comment