Reading Input from the Console

Console.ReadLine()

We can read input from the console by running the Console.ReadLine() method.

using System;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("What is your name?");
            string name = Console.ReadLine();
            Console.WriteLine($"Hello, {name}");
        }
    }
}

That's it!

Nothin' to it.