using System;
class PrintName
{
static void PrintUserName()
{
Console.Write("Enter name: ");
string name = Console.ReadLine();
Console.WriteLine("Hello {0} ! ", name);
}
static void Main(string[] args)
{
PrintUserName();
}
}
class PrintName
{
static void PrintUserName()
{
Console.Write("Enter name: ");
string name = Console.ReadLine();
Console.WriteLine("Hello {0} ! ", name);
}
static void Main(string[] args)
{
PrintUserName();
}
}
Tags:
c# tutorials