Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   Switch Case "goto" (http://www.go4expert.com/forums/switch-case-goto-t3747/)

shah123 4Apr2007 16:20

Switch Case "goto"
 
Hi If i have switch statement look like this and after getting or display function or by entering wrong character(default) how can i go to same screen which will display different options. As i know there are goto statements but that is not recommended? So please can anybody recommend me what to use or to do?
Code:

switch (s)
            {
                case "g":
                uname.getUserName();
                break;
   
                case "v":
                uname.DisplayUserName();
                break;
             
                default:
                Console.WriteLine("Please select correct choice...");

Thnx,
Regards,

shabbir 4Apr2007 19:13

Re: Switch Case "goto"
 
Duplicate of Switch Case Options. Thread closed.


All times are GMT +5.5. The time now is 18:30.