C# evolution look in a glance :

1. Parallel.ForEach
Parallel.ForEach is a feature introduced by the Task Parallel Library (TPL). This feature helps you run your loop in parallel. You need to have a multi-processor to use of this feature.
Simple foreach loop
foreach (string i in listStrings)
{
// put your statement here
}
Parallel foreach
Parallel.Foreach(listStrings, text=>
{
// put your statement here
});
2. BigInteger
BigInteger is added as a new feature in the System.Numerics DLL. It is an immutable type that represents a very large integer whose value has no upper or lower bounds.
BigInteger obj = new BigInteger("123456789123456789123456789");
3. ExpandoObject
The ExpandoObject is part of the Dynamic Language Runtime (DLR). One can add and remove members from this object at run time.
Create a dynamic instance.
dynamic Person = new ExpandoObject();
Person.ID = 1001;
Person.Name = "Princy";
Person.LastName = “Gupta”;
4. Named and Optional Parameters
Optional Parameters
A developer can now have some optional parameters by providing default values for them. PFB how to create optional parameters.
Void PrintName(string a, string b, string c = “princy”)
{
Console.Writeline(a, b, c)
}
We can now call the function PrinctName() by passing either two or three parameters as in the following:
PrintName(“Princy���,”Gupta”,”Jain”);
PrinctName(“Princy”,”Gupta”);
Output
PrincyGuptaJain
PrincyGuptaprincy
Note: An optional parameter can only be at the end of the parameter list.
Named Parameters
With this new feature the developer can pass values to parameters by referring to parameters by names.
Void PrintName(string A, string B
{
}
Function call
PrintName (B: “Gupta”, A: “Princy”);
With this feature we don't need to pass parameters in the same order to a function.
5. Tuple
A Tuple provides us the ability to store various types in a single object.
The following shows how to create a tuple.
Tuple<int, string, bool> tuple = new Tuple<int, string, bool>(1,"princy", true);
Var tupleobj = Tuple.Create(1, "Princy", true);
In order to access the data inside the tuple, use the following:
string name = tupleobj.Item2;
int age = tupleobj.Item1;
bool obj = tupleobj.Item3;
6. Compiler APIs
This feature is supposed to come after C# 5.0 – the APIs will expose whatever knowledge the compiler has about the code to the IDE and the developers, through Syntax Tree APIs, Symbol APIs, Binding and Flow analysis APIs and Emit APIs.
You can use following References for more details.
7. Windows Runtime Support
C# and .NET now have deep integration with the Windows Runtime. C# project can compiled into a WinMD file and then referenced from a HTML/JavaScript project. WinRT’s flavor of COM uses the same metadata format used by the Common Language Runtime. This information is stored in WINMD files that show the structure, though not the implementation, of all the public classes. Windows Runtime returns an HRESULT instead of throwing an exception. For well-known HRESULT values, the corresponding exception is thrown, otherwise a COMException is used.