First C# Program
using System; // Includes c# class libraries
public class Basic_program // Basic_program is the name of the class
{
static void Main(String[] args) // Execution starts from Main method
{
Console.WriteLine("Enter your name"); // Console.WriteLine() Displays messages on the console
string name = Console.ReadLine(); // Console.ReadLine() Used for accepting the user input
Console.WriteLine("Your name is : " + name);
Console.ReadLine(); // Here it is used for holdig console screen
}
}
Output:
Enter your name
Smith
Your name is : Smith