Reading strings from the keyboard
using System;
class Prog3_1
{
public static void Main()
{
Console.Write ("Enter Your First Name : "); // Displaying to write first name
string name1 = Console.ReadLine (); // Saving first name in name1
Console.Write ("Enter Your Last Name : "); // Displaying to write last name
string name2 = Console.ReadLine (); // Saving first name in name2
Console.WriteLine ("Hello Mr." + name1 +" " + name2); // Displaying both first & last names
Console.ReadLine (); // Since to stop the console for displaying last line, we use this to accept a
keystroke frm user. (Similar to getch() in C)
}
}