C# exit funciton code example
Example 1: how to exit a program in c#
Application.Exit();
Example 2: c# how to exit program
System.Environment.Exit(1);
Example 3: exit a method c#
private void Test(int condition)
{
if(condition)
return; // Exit the methode
// Here code if condition == false
}