Introduction of C#

  • It is a one part of .Net Framework.
  • .Net is a software Framework developed by Microsoft.
  • It runs only windows Platform.
  • It support OOPS concept.
Example : -

using System; //include Namespace
class Program
{
static void Main() //Main method
{
Console.WriteLine("www.tutorialslife.com"); //Output Code
Console.ReadKey(); //waiting for input
}
}

Output :-
www.tutorialslife.com

Namespace:
It is a collection of class files. Above example mention "using System;" means it call system class. System is a predefined class in .Net.

Above example Main() method calling in Program class. Main method write some message.

Console.WriteLine("www.tutorialslife.com");
Console is calling from System class and it have WriteLine method.
Console.WriteLine renders a line of text on the console.
It always receive string values.

Console.ReadKey();
Readkey method is waiting for press any key then after terminate the main program.

Please follow the below steps:
Step:-1 Open Visual Studio 2012/any version of Visual Studio
 
Step:- 2

Step:-3
Step:-4
Step:-5
Step:-6
 
Oldest