Reading
& Writing to Console
Example of –Place Holder Syntax- most preferred
•Writing
to the Console.
•Reading
from Console
•
Two
ways of Writing to the Console
–Concatenation
–Place
Holder Syntax- most preferred
Example of –Place Holder Syntax- most preferred
using System;
class Program
{
static void Main()
{
Console.WriteLine("what is your First Name ?");
string FirstName = Console.ReadLine();
Console.WriteLine("what is your Last Name ?");
string LastName = Console.ReadLine();
Console.WriteLine("Your Name is {0}, {1} ", FirstName, LastName);
}
}