How do I perform console reads?
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?
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();
System.Console.Write("Enter your name: ");
string name = System.Console.ReadLine();
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement