Auto exit script

Hello all.
I’ve been scouring the manual and api and I was wondering if someone could tell me if there was a way that i could implement a line of code (preferably C#) to close the application after a certain amount of time?

void Start ()
{
// directly calling Application.Quit doesn’t seem to work
Invoke(“DoQuit”, 60); // 60 seconds
}

private void DoQuit()
{
  Application.Quit();
}

I changed “private void DoQuit()” to “public void DoQuit()” and it worked.