I am writing a function, as in C #:
public void CountNumber()
{
for(int i = 0; i < 40; i++) {
if(i > 20) {
goto out1;
}
Console.WriteLine("hello " + 1);
out1:
string hello = "";
}
}
This basically counts the number, and if I'm over 20, it should not write to console.writeline. it must step over and press "out1", but "out1" must have a function at the end to compile. It must have the command "string hello =" "to compile. I do not need the string hello =" "". I just want him to do nothing and get the end of the cycle. Is there a way to do this without the "string hello =" "" that the out1 instruction requires? How:
public void CountNumber()
{
for(int i = 0; i < 40; i++) {
if(i > 20) {
goto out1;
}
Console.WriteLine("hello " + 1);
out1:
}
}
Thank.
iefpw source
share