What is C# (C Sharp) ?

What is C#  (C Sharp) ?

C# is a general-purpose, modern and object-oriented programming language pronounced as “C sharp”. C# is a programming language of .Net Framework.C# is an object-oriented programming language derived from C++ and Java. C# allows developers to build applications using Visual Studio on .Net platform. C Sharp supports below type of applications

  • Window applications
  • Web applications
  • Distributed applications
  • Web service applications
  • Database applications etc.

Our C# tutorial includes all topics of C#

  • Control statements
  • Objects and classes
  • Inheritance
  • Constructor
  • Destructor
  • Polymorphism
  • Abstraction
  • Abstract class
  • Interface
  • Namespace
  • Encapsulation
  • Properties
  • Indexer
  • Arrays
  • Strings
  • Regex
  • Exception handling
  • Multi threading
  • File IO
  • Collections

Below is C# example program to print Expert Software Team

using System;
namespace Expertsoftwareteam{
class Demoexample {
static void main(){
    Console.WriteLine("Expert Software Team");
	}
  }
}
  • A namespace is a collection of multiple classes. Each namespace is declared with keyword ‘using’.
  • The first statement of the code includes the namespace ‘System’ into our program. System namespace defines the fundamental classes and events used in C#. The namespace to be used depends on the program requirement.
  • The second statement is declaring a namespace “Expertsoftwareteam” for the class “Demoexample” A C# file can contain multiple classes within the same namespace.
  • The third statement includes the class declaration. A class may contain multiple attributes and multiple methods.
  • The fourth statement includes a declaration of the Main method. The main method is the entry point of execution for each class.
  • The last statement is the C# syntax used for printing a statement to console. WriteLine is a method of the class ‘Console.

 

* The Content stated above is for informational purpose only. Expert Software Team is not responsible if any part of content found meaningless in any manner or condition.

Leave a Reply

Your email address will not be published. Required fields are marked *