나는이 코드를 사용자가 1 또는 2 등을 누를 수있게 해주는 몇 가지 switch-case 문과 함께 가지고있다. 그리고 다른 옵션들이 나타난다. 메서드 나 다른 것으로 cmd.exe의 이전 상태로 돌아갈 수 있는지 알고 싶습니까? 다시 말해, 버튼을 누르고 cmd.exe에서 새로운 팝업이 나오면 사용자가 3을 눌러서 cmd의 첫 번째 출력으로 돌아갈 수있는 switch case 문에 뭔가를 구현할 수 있습니까? 예를 들어 1시에 밀어 넣은 후에 나온 출력을 지우고 지우십시오.cmd.exe의 한 지점에서 이전 지점으로 돌아갈 가능성?
switch (userValue)
{
case '1':
Console.WriteLine("\n" + "You have entered a default
tournament:" + "\n");
Console.Write("Press 1 to start the first tournament" + "\n" + "Press 2 to start the second tournament + "\n" + "Press 3 to return";
+ "\n" + "Insert your choice...: ");
var userType = Console.ReadKey().KeyChar;
Console.WriteLine();
{
switch (userType)
{
case '1':
Console.WriteLine("something");
break;
case '2':
Console.WriteLine("something");
break;
case '3':
//WHAT TO DO HERE???
}
break;
}
case '2':
Console.WriteLine("\n" + "You have entered women's single");
Console.Write("Press 1 to start the tournament:" + "\n" + "Press 2 to list the players by first name:" + "\n" +
"Press 3 to list the players by last name:" + "\n" + "Insert your choice...: ");
var userChoice = Console.ReadKey().KeyChar;
Console.WriteLine();
{
switch (userChoice)
{
case '1':
SelectTournamentMenu();
break;
case '2':
break;
case '3':
break;
}