Friday, November 6, 2009

How to use variables in C#.net?

While the program is under execution, the data is store in memory temporarily. Here the variable is the name given for the memory location, which contain the data of particular data type. Each variable must contain its data type and the variable name. In C# all the variables should be declared before using it.


Syntax : <> <>;

Example: int a;

Which means that a is of integer variable and can hold only integer data;
All the value type variable declaration follows the same syntax.

No comments:

Post a Comment