Mobirise

C# | Introduction

C# tutorial provides basic and advanced concepts of C#. Our C# tutorial is designed for beginners and professionals.

C# is a programming language of .Net Framework.

Our C# tutorial includes all topics of C# such as first example, control statements, objects and classes, inheritance, constructor, destructor, this, static, sealed, polymorphism, abstraction, abstract class, interface, namespace, encapsulation, properties, indexer, arrays, strings, regex, exception handling, multithreading, File IO, Collections etc.

What is C#

C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by Microsoft that runs on .Net Framework.

By the help of C# programming language, we can develop different types of secured and robust applications:

Window applications
Web applications
Distributed applications
Web service applications
Database applications etc.
C# is approved as a standard by ECMA and ISO. C# is designed for CLI (Common Language Infrastructure). CLI is a specification that describes executable code and runtime environment.

C# programming language is influenced by C++, Java, Eiffel, Modula-3, Pascal etc. languages.

C# Example with C# Editor

Our "Try it Yourself" tool makes it easy to learn C#. You can edit C# code and view the result in your browser.

Example

using System;

namespace HelloWorld
{
  class Program
   {
      static void Main(string[] args)
       {
           Console.WriteLine("Hello World!");
        }     
    }
}

output

 HelloWorld 

1

 Features of C#

Although C# constructs closely follow traditional high-level languages, C and C++ and being an object-oriented programming language. It has strong resemblance with Java, it has numerous strong programming features that make it endearing to a number of programmers worldwide.

Following is the list of few important features of C# −

Boolean Conditions
Automatic Garbage Collection
Standard Library
Assembly Versioning
Properties and Events
Delegates and Events Management
Easy-to-use Generics
Indexers
Conditional Compilation
Simple Multithreading
LINQ and Lambda Expressions
Integration with Windows

2

Why Use C#?

It is one of the most popular programming language in the world
It is easy to learn and simple to use
It has a huge community support
C# is an object oriented language which gives a clear structure to programs and allows code to be reused, lowering development costs.
As C# is close to C, C++ and Java, it makes it easy for programmers to switch to C# or vice versa 

3

C# History

History of C# language is interesting to know. Here we are going to discuss brief history of C# language.

C# is pronounced as "C-Sharp". It is an object-oriented programming language provided by Microsoft that runs on .Net Framework.

Anders Hejlsberg is known as the founder of C# language.

It is based on C++ and Java, but it has many additional extensions used to perform component oriented programming approach.

C# has evolved much since their first release in the year 2002. It was introduced with .NET Framework 1.0 and the current version of C# is 5.0.

Let's see the important features introduced in each version of C# are given below.

Created with Mobirise site templates