DotNET Schools

Blogs & Tutorials for Microsoft.NET and Leading web Technologies

NULL Conditional Operator In C# 6.0

Sometimes developers get the following exception: “object reference not set to an instance of an object”. Whenever we got such type of exception our mouth fell open but in C# 6 we can handle it easily using NULL Conditional Operator. So we can handle “System.NullReferenceException” using this operator. I am going to explain it with a very simple example where I am handling NullReferenceException for string datatype.

Null-Conditional operator (?.) Read More

Loading