Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: SortedList, Key as element of Value Pin
Luc Pattyn13-May-09 9:24
sitebuilderLuc Pattyn13-May-09 9:24 
GeneralRe: SortedList, Key as element of Value Pin
Aaron Hartley13-May-09 9:46
Aaron Hartley13-May-09 9:46 
GeneralRe: SortedList, Key as element of Value Pin
OriginalGriff13-May-09 9:51
mveOriginalGriff13-May-09 9:51 
AnswerRe: SortedList, Key as element of Value Pin
Kythen13-May-09 9:31
Kythen13-May-09 9:31 
QuestionC# Console Application Pin
bigjoe11a13-May-09 7:49
bigjoe11a13-May-09 7:49 
AnswerRe: C# Console Application Pin
Jimmanuel13-May-09 8:10
Jimmanuel13-May-09 8:10 
GeneralRe: C# Console Application Pin
bigjoe11a13-May-09 8:17
bigjoe11a13-May-09 8:17 
GeneralRe: C# Console Application Pin
Jimmanuel13-May-09 8:38
Jimmanuel13-May-09 8:38 
Seriously, gotos are the biggest indicator in the world of poorly structured code. Code flow should be handle by conditionals and loops and I'm guessing that's the main cause of your problems. My beginners attempt would start like this:
Semi-Psuedo Code:
bool done = false;
while (!done)
{
    int userInput = 0;
    do
    {
        PrintMainMenu();
        userInput = GetNextInput();
    } while (!InputIsValid(userInput));

    switch (userInput)
    {
        case 0:
            PrintHelpMenu();
            break;
        case 1:
            RunGamesMenu();
            break;
        case 2:
            Console.WriteLine("Exiting");
            done = true;
            break;
        // and so on and so on   
    }
}

P.S. put pre tags around code snippets to preserve formatting


Badger | [badger,badger,badger,badger...]

GeneralRe: C# Console Application Pin
bigjoe11a13-May-09 10:00
bigjoe11a13-May-09 10:00 
GeneralRe: C# Console Application Pin
Jimmanuel13-May-09 11:33
Jimmanuel13-May-09 11:33 
GeneralRe: C# Console Application Pin
OriginalGriff13-May-09 8:43
mveOriginalGriff13-May-09 8:43 
GeneralRe: C# Console Application Pin
bigjoe11a13-May-09 10:26
bigjoe11a13-May-09 10:26 
GeneralRe: C# Console Application Pin
OriginalGriff13-May-09 22:24
mveOriginalGriff13-May-09 22:24 
GeneralRe: C# Console Application Pin
bigjoe11a14-May-09 4:12
bigjoe11a14-May-09 4:12 
GeneralRe: C# Console Application Pin
OriginalGriff14-May-09 4:31
mveOriginalGriff14-May-09 4:31 
GeneralRe: C# Console Application Pin
bigjoe11a14-May-09 4:39
bigjoe11a14-May-09 4:39 
GeneralRe: C# Console Application Pin
OriginalGriff14-May-09 4:48
mveOriginalGriff14-May-09 4:48 
GeneralRe: C# Console Application Pin
bigjoe11a14-May-09 4:53
bigjoe11a14-May-09 4:53 
Questiondatagrid scroll Pin
michaelgr113-May-09 7:29
michaelgr113-May-09 7:29 
AnswerRe: datagrid scroll Pin
Dave Kreskowiak13-May-09 8:59
mveDave Kreskowiak13-May-09 8:59 
QuestionWindows resizing Pin
michaelgr113-May-09 7:06
michaelgr113-May-09 7:06 
AnswerRe: Windows resizing Pin
musefan13-May-09 7:10
musefan13-May-09 7:10 
AnswerRe: Windows resizing Pin
Giorgi Dalakishvili13-May-09 7:11
mentorGiorgi Dalakishvili13-May-09 7:11 
QuestionAppDomain Pin
humayunlalzad13-May-09 6:42
humayunlalzad13-May-09 6:42 
AnswerRe: AppDomain Pin
musefan13-May-09 6:58
musefan13-May-09 6:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.