• Advertisement
Sign in to follow this  

How do I perform console reads?

This topic is 4328 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

After learning how to use the "System" object to access pretty much any command that I can access when using the dos or "command" prompt, I am still puzzled. I am able to run programs and call functions using System.Function() but how can I read from the command prompt after these functions and programs are called? Can someone toss me a hint here?

Share this post


Link to post
Share on other sites
Advertisement
The "System" you're refering to isn't an object. System is a namespace in which the Console class resides:

System.Console.Write("Enter your name: ");
string name = System.Console.ReadLine();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement