Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void start()
- {
- while (choice != 0)
- {
- try
- {
- choice = int.Parse(Console.ReadLine());
- }
- catch (Exception e)
- {
- todo: skriv exception
- start();//kör om startmetoden
- }
- switch (choice)
- {
- case 1:
- //gör något
- break;
- case 2:
- //gör något
- break;
- case 0://avslutar programmet
- Environment.Exit(0);
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement