[C#][ShowOFF]First Program[C#][ShowOFF]

Results 1 to 5 of 5
  1. #1
    Vous Pas Reel HotelUnderSeige is offline
    MemberRank
    Nov 2007 Join Date
    ColoradoSpringsLocation
    1,290Posts

    [C#][ShowOFF]First Program[C#][ShowOFF]

    My first C# program :D
    Tells me what you think :D
    PHP Code:
    using System;

    namespace 
    ConsoleApllication1
    {
        class 
    Program
        
    {
            static 
    void Main(string[] args)
            {
                
                
                
    begin:
                
    Console.WriteLine("Please enter fisrt name:");
                
    string firstname Console.ReadLine();

                            
                
    Console.WriteLine("Please enter last name:");
                
    string lastname Console.ReadLine();

                
    Console.WriteLine("Is " firstname " " lastname " your full name");    
                
    string input Console.ReadLine();        
                switch (
    input)
                {
                        case 
    "yes":
                    
    Console.WriteLine("Your Name Is " firstname " " lastname);
                    break;
                    case 
    "no":
                    goto 
    begin;
                }
            

            
                
                

                
    Console.ReadLine();
                }
            }
        }

    http://i229.photobucket.com/albums/e...eenshot-21.png
    http://rapidshare.com/files/185850275/hello.exe.html


  2. #2
    Account Upgraded | Title Enabled! Cask is offline
    MemberRank
    Jul 2007 Join Date
    887Posts

    Re: [C#][ShowOFF]First Program[C#][ShowOFF]

    Don't get into the habit of using goto.

  3. #3
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    Re: [C#][ShowOFF]First Program[C#][ShowOFF]

    Goto's...it makes you write spaghetti-code...now you finally choose a high-level language, you still use ASM methods!

  4. #4
    Enthusiast Niv123123 is offline
    MemberRank
    Apr 2008 Join Date
    38Posts

    Re: [C#][ShowOFF]First Program[C#][ShowOFF]

    Nice for start..
    Don't use "Goto" loop, you can use "while" loop and it will work better..
    if you need any help talk with me ;)
    and btw, only idiot people will say "no", cuz its what he entered.. XD

  5. #5
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: [C#][ShowOFF]First Program[C#][ShowOFF]

    ^ why she got pink name cool software :)



Advertisement