Introduction to C#

1. Write a C# program to print "Hello World" on the console.

using System;
class Program
{
    static void Main()
    {
        Console.WriteLine("Hello world");
    }
}
  • The namespace declaration, using System, indicates that you are using the System namespace.
  • A namespace is used to organize your code and is a collection of classes. interfaces, structs, enums, and delegates.
  • the main method is the entry point into your application.

Comments

Popular posts from this blog

Common Operators in C#

Built-in types in C#