Search This Blog

Monday, September 20, 2010

Variables

In C# we have various variables, in this post we study "string" type variable. "String" variables can contains all type of symbols. Whlie assing a value to string variable we must use the (") symbol of the begining and the end of the value.

Example 1
Identifying a string variable:
string name;

Example 2
Assing a value to this variable:
name = "Bill";

Example 3
We can assing value to a variable while we creating it:
string name = "Bill";

Example 4
We can create multiple variables and assing values at one time:
string name = "Bill", lastname = "Gates";

In the next post we will study "integer" type variables.