C# Introduction

  Keywords : Introduction to c# with examples, C# programming language uses .net framework to compile and run the applications which we written in c#

Here we will learn the basics of c# programming language those are what is c#, overview of c# programming, features of c# programming and history of c# programming.

What is C# Programming Language?

C# (pronounced as “C Sharp”) is a simple, modern, object-oriented and type safe programming language. C# language has it's roots from the family of C languages such as C, C++ and it is mostly similar to Java programming.

 

C# Programming language will allow developers to build a variety of secure and robust applications such as windows applications, web applications, database applications, etc. which will run on .NET Framework.

 

C# programming language has built on .NET Framework so to run the c# applications, we required to install a .NET Framework component on our machines.

 

.NET Framework is a development platform for building an apps for windows, web, azure, etc. by using programming languages such as C#, F# and Visual Basic. It consists of a two major components such as Common Language Runtime (CLR), it’s an execution engine that handles running apps and .NET Framework Class Library, which provides a library of tested and reusable code that developers can use it in their applications.

Overview of C#

  • C# is an object oriented programming language and it supports the concepts of encapsulation, abstraction, polymorphism, etc.
  • In c# all the variables, methods and application’s entry point are encapsulated within the class definitions.
  • C# is developed specifically for .NET Framework and it enable programmers to migrate from C/C++ and Java easily.
  • C# is fully Event-driven and visual programming language.
  • Microsoft provided an IDE (Integrated Development Environment) tool called Visual Studio to implement c# programs easily.

Features of C#

C# contains various features that make it similar to other programming languages such as c c++ and java. There are some additional features in C# which make it differ from other languages.

 

  • C# is modern programming language and it is very powerful, simple for building the applications
  • C# is useful in developing windows, web and device applications.
  • C# provides an automatic memory management by clearing unused objects
  • C# is a type safe programming language and it make impossible to perform unchecked type casts.
  • C# provides a structured and extensible approach for error detection and recovery.
  • C# is a structure oriented programming language and the compilation, execution of c# applications are faster due to automatic scalability.

History of C#

The C# programming language has been implemented by Anders Hejlsberj, the employee of Microsoft and the initial release of C# programming language is on 2002 with .NET Framework 1.0 and it’s more like Java programming.

 

Following table lists the evaluation of c# programming language with multiple features along with .NET Framework and visual studio.

 

VersionYear.NET FrameworkVisual StudioFeatures
C# 1.0 2002 1.0 / 1.1 Visual Studio 2002 Basic Features
C# 2.0 2005 2.0 Visual Studio 2005
  • Generics
  • Partial types
  • Anonymous methods
  • Nullable types
  • Iterators
  • Covariance and contravariance
C# 3.0 2007 3.0 / 3.5 Visual Studio 2008
  • Auto implemented properties
  • Anonymous types
  • Query expressions
  • Lambda expression
  • Expression trees
  • Extension methods
C# 4.0 2010 4.0 Visual Studio 2010
  • Dynamic binding
  • Named/optional arguments
  • Generic covariant and contravariant
  • Embedded interop types
C# 5.0 2012 4.5 Visual Studio 2012 / 13
  • Asynchronous members
  • Caller info attributes
C# 6.0 2015 4.6 Visual Studio 2015
  • Static imports
  • Exception filters
  • Property initializers
  • Expression bodied members
  • Null propagator
  • String interpolation
  • nameof operator
  • Dictionary initializer
C# 7.0 2017 .NET Core Visual Studio 2017
  • Out variables
  • Tuples and deconstruction
  • Pattern matching
  • Local functions
  • Expanded expression bodied members
  • Ref locals and returns
 

PREVIOUS

C# Tutorial