CSharp examples for Language Basics:Console
Read line from console window
using System;//from w w w.ja va2 s . com class Program { static void Main(string[] args) { Console.Write("Type your first name and press ENTER: "); string firstName = Console.ReadLine(); Console.Write("Type your age and press ENTER: "); string age = Console.ReadLine(); Console.WriteLine($"Hello {firstName}, you look good for {age}."); } }