-5

Is it was possible to run a console application in c# which has the ability to go back to a area of code?

More details --

Application launch:

start code

runs thought code

Goes back to start

I know this can be done in batch with marking an area with :test1 then goto test1 will return

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179

2 Answers2

0

You could either use a loop, or you somewhat partially answered your own question in that you could use the goto keyword.

Broots Waymb
  • 4,713
  • 3
  • 28
  • 51
0

Highly recommend you use a loop. Your options are: do...while, for, or while. Any of them would work depending on what basis you want to loop on.

Simplest case you want to never end:

while(true){
...
}
Coding Orange
  • 548
  • 4
  • 7