Freigeben über


Lets Learn C#

By Ashwin Venugopal

Let’s have a look at the below C# program.

// Namespace Declaration
using System;
class BinaryTitans
{
 public static void Main()
{
// Write to console
 Console.WriteLine ("Welcome to BinaryTitans and you are learning C# from Ashwin");
}
}

What is using System declaration?

The namespace declaration, using System, indicates that you are using the System namespace.

If  you decide not to write using System, declaration, then you have to use the fully qualified name of the Consoleclass (You got to write System.Console.WriteLine).

A namespace is used to organize your code and is a collection of classes, interfaces, structs, enums and delegates.

What isMain()  method?

Main method is the entry point into your application.

Happy Learning!

Comments

  • Anonymous
    March 15, 2017
    The comment has been removed
    • Anonymous
      March 16, 2017
      The comment has been removed