// dataType varName = initialValue;
int myInt = 0;
// You can also declare and assign on two lines.
string myString;
myString = "This is my character data";
Console.WriteLine();
}
It is also permissible to declare multiple variables of the same underlying type on a single line
of code:
static void LocalVarDeclarations()
{
Console.WriteLine("=> Data Declarations:");
int myInt = 0;
string myString;
myString = "This is my character data";
Do'stlaringiz bilan baham: