About C#, its Versions and Features

 

C# is an object oriented programming language developed by Microsoft as part of the .Net initiative and later approved  as a standard by ECMA & ISO. 

During the development of .Net the Class Libraries were originally written in a language called Simple Managed C(SMC), later the language as been renamed as C#(C Sharp). 

The ECMA standards list the following design goals for C#. 

·         It is intended to be a simple, modern, general purpose and object oriented programming language. 

·         The language should include strong type checking, array bounds checking, detection of attempts to use uninitialized variables, source code portability and automatic memory management. 

·         The language is intended for use in developing software components that can take advantage of distributed environments. 

·         Programmers portability is very important in software industry, so especially for those programmers already familiar with C & C++, C# will be the best choice. 

·         Support for internationalization. 

·         C# is intended to be suitable for writing applications for both hosted and embedded systems. 

There are several versions of C#, those are C# 1.0, C# 1.5, C# 2.0, C# 3.0, C# 4.0.

 

C# 2.0 Features: 

·         Partial Classes 

·         Generics or Parameterized types. 

·         Static Classes 

·         Anonymous delegates 

·         Nullable value types 

·         Collision operator(jQuery15206219021829333993_1347293283127) that returns the first of its operands which is not null or null if no such operand exists.

 

C# 3.0 Features: 

In addition C# 2.0, C# 3.0 has some more features. Those are 

·         Language Integrated Query(LINQ) 

·         Object Initializers and Collection Initializers 

·         Anonymous Types 

·         Implicitly typed arrays and variables 

·         Lambda Expressions 

·         Automatic Properties 

·         Extension methods 

·         Partial methods 

C# 4.0 Features 

C# 4.0 added some more new features, those are 

·         Dynamic Programming & Lookups 

·         Named and Optional Parameters 

·         Covariance and Contra Variance 

·         Indexed Properties 

·         COM specific interop features. 

In general there two different programming approaches are there. Those are Procedural approach and Object Oriented approach. 

Procedural approach: Languages that are existing before 70's are considered to be procedural languages. A program that is written these languages is a collection of variables and functions. The members that are defined in a program has to be executed must be called from main() function because it is the entry point of a program. The disadvantage of Procedural Programming languages is they doesn't provide security and reusability of code.

 

Object-Oriented approach: This came into existence in 70's to resolve the problems of procedural languages. In Object  Oriented languages also a program is a collection of members but to provide security for the members they are enclose under a special container known as a class that provides security for members defined in it. 

A class is a user-defined type much like a structure in Procedural languages. A class or a structure if we want to consume after defined, we must create an object of them. 

Any data type user-defined or pre-defined can be never consumed directly because data types will not have memory allocation. So if you want to consume data types you must create copy of data type for which memory is allocated for execution