Results 1 to 3 of 3

Thread: Reading Varibles from Console

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    23

    Reading Varibles from Console

    Well I've been doing some more work with C# and Im doing pretty good with it I got a little problem. I can't figure out how to read variables from the console. Example: in python it would be something like this:
    Code:
    user = raw_input("What is you name? ")
    but I don't know how to do something like that in C# .NET Express I tried almost everything and I couldn't find anything >_<
    Anyone know how I can do this?
    Thanks in advance

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: Reading Varibles from Console

    Code:
                Console.Write("What is your name? ");
                String user = Console.ReadLine();

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jan 2006
    Posts
    23

    Re: Reading Varibles from Console

    Wow I didn't think of that, thanks for the help I appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width