how to call “ static void Main(string[] args) ”in the class again

后端 未结 5 490
渐次进展
渐次进展 2021-01-23 20:53

i am new in C# and working on Console Applications now a days i wrote the following code :

Program.cs

using System;
using System.Collect         


        
5条回答
  •  不知归路
    2021-01-23 21:13

    something like this :

    static void Main(string[] args)
                {      
                    string selectedOption = "";
    
                     do 
                     {
    
                                   ...........
    
                     }
                     while (selectedOption == "y")
    
                     if (selectedOption == "n")
                     {
                       //Terminate the Program
                      }
    
                 } 
    

提交回复
热议问题