C# how to break public Void [closed]

To “break” from a function use return:

public void test(bool start)
{
  if (start) //do something;
  else   // i use else for update with help other code and... forget it
  {
     //do somethings (it is loop )
     pleas reset trace of test to first line of test
     return; // This ends the method, and returns to the caller
  }
}

Leave a Comment