Programs become interactive when they can accept input from users! In C#, we use Console.ReadLine() to read what the user types.
using System; class Program{ static void Main() { Console.WriteLine("What is your name?"); string name = Console.ReadLine(); Console.WriteLine("Hello, " + name + "!"); }}Example Interaction:
What is your name?
Alice
Hello, Alice!