Answers for "how to exit program through button c# console"

C#
6

c# exit console

static void Main()
{
	//do stuff
  
	Environment.Exit(1);// exit
}
Posted by: Guest on March-02-2020
0

c# quit button script

public class MainMenu : MonoBehaviour
{

    public void QuitGame()
    {
        Application.Quit();
    }
}
//add QuitGame to the Button On click Function
//Fill the object accordingly
Posted by: Guest on April-22-2022

C# Answers by Framework

Browse Popular Code Answers by Language