Hi
Member 12230809
,
Never use
Goto
, it is a forbidden material that is put on the shelf - you can just know about it, but never touch it :).
Just wrap your code with a
WHILE
loop. Essentially, it offers the same effect as the
Goto
.
Open Files
while(true)
{
if (File.Exists(cFiles))
{
ReadCode
break;
}
else
{
Open Files
}
}
However, since we don't know what your 'open files' does, you need to put some kind of condition at the else block. E.g.: quitting if number of files that are checked so far reaches the total files etc. Otherwise the loop will continue forever causing the program to crash.