C
C#leaner
In the following code, I am getting a compile error saying that use of
unassigned local variable d.
Can anyone help?
----------------------------------------------------------------------------------------------
string d;
int i=1;
while (i<13)
{
i++;
if (i==1)
d="first";
if (i==2)
d="second";
Console.WriteLine("\nOn the [0] day of Christmas", d);
}
unassigned local variable d.
Can anyone help?
----------------------------------------------------------------------------------------------
string d;
int i=1;
while (i<13)
{
i++;
if (i==1)
d="first";
if (i==2)
d="second";
Console.WriteLine("\nOn the [0] day of Christmas", d);
}