Thanks! I finally done it! Well im pretty sure i have
Woohoo! Good job! =)
A couple of things:
1.
for (int i = 0; i < s; i++)
{
Console.Write(name);
Console.ReadKey(true);
continue; // this is redundant
}
When the keyword [font="Courier New"]continue[/font] is encountered the program will execute the 'update statement' in the for-loop (in this case [font="Courier New"]'i++'[/font]) and jump to the beginning of the loop. In effect, the code below the continue statement will be skipped. In your case, however, there is no code below the continue statement which makes it redundant. Typically you use a continue statement when you do not want to process certain elements in a list/array:
for (int i = 0; i < s; i++)
{
if(Objects.paintMe==false)
continue;
PaintObject(Objects);
}
2.
int n = nameBack.Length;
for (int i = 0; i < n; i++)
{
Console.Write(nameBack[nameBack.Length -i -1]);
}
The idea of saving the length of the string at the beginning is to ensure you are always referencing the original length. Also, when you only have a single statement in your loop you don't need the curly brackets:
int n = nameBack.Length;
for (int i = 0; i < n; i++)
Console.Write(nameBack[n-i-1]); // notice that we are now using 'n' instead of 'nameBack.Length'
.. or, if you want to be really hardcore:
int n = nameBack.Length-1;
for(;n>=0;n--)
Console.Write(nameBack[n]);