Showing posts from April, 2015

What's New In C# 6.0?

Microsoft  has released the preview version of  Visual Studio 2015  and  .NET 4.6  for developers to try and provide feedback on usage or issues. .NET 4.6 preview comes with C# 6.0  which includes the new additional features expected by developers to improve the coding productivity. In this article I am going to describe the new features introduced in  C# 6.0 . If you haven’t download the Visual Studio 2015 please get it from below download button. Property Initialization with default value In C# 6.0 we can initialize the default value to property right from the place we create it. With the help of this we can avoid the chances of null errors while accessing property when no value assigned. Old Style:          public   int  Id {  get ;  set ; }          public   string  FirstName {  get ;  set ; } New Style:          public   int  Id {  get ;  set ; } = 1001;          public   string  FirstName {  get ;  set ; } =  "Srinivas" ; String Interpolation