Quantcast
Channel: Daily .NET Tips » What’s New in C#6.0
Browsing latest articles
Browse All 9 View Live

Simplify Static Member Access – Using Statement With Static Classes in C# 6.0

C# 6.0 introduced many small and useful features that helps developers to write clean code. On of such feature is “Using Statement with Static Classes”. We know a static class cannot be instantiated....

View Article



Easily format strings – String interpolation in C# 6.0

Formatting the string values are very common during development. We generally use String.Format() method, that replaces each format item in a specified string with the text equivalent values from the...

View Article

Initialize Auto-Property and Getter Only Auto-Property in C# 6.0

So far we have seen, Property can be initialized only in the constructor, and if it has any backing field defined, that can be initialized where it is declared.   C# 6.0  introduced a new features...

View Article

Expression – Bodied Methods in C# 6.0

Expression-bodied methods is another feature in C# 6.0  that simply the syntactic expression in C# . We are already familiar with  Lambda expression  that associate with function and  call by a...

View Article

Using await in a catch or finally block – in C# 6.0

Using Async methods are very common now a days and while working with  async and await,  you may have experienced that you want to put some of the result awaiting either in a catch or finally block or...

View Article


Conditional Exception Handling – Exception Filters in C# 6.0

C# 6.0 has two changes for exception handling. In the previous post we have discussed about Using await in a catch or finally block – in C# 6.0 , and the another one is the filtering the exception....

View Article

Using nameof Operator in C# 6.0

C# 6.0 introduced a new operator named, nameof  that accepts the name of code element and returns a string literal of the same element.  The nameof operator can take as a parameter like class name and...

View Article

Null – Conditional Operators in C# 6.0

Along with the nameof operator, C# 6.0 also introduced Null-Conditional operator that enable developers to check the null value with in an object reference chain. The null –  conditional operator ( ?.)...

View Article


Initialization of Dictionary – Dictionary initializer in C# 6.0

Initialization of Dictionary is not a new thing. You can easily initialize a Dictionary Object using a Collection Initializer, which is there since C# 3.0. Collection initializer adds one of the...

View Article

Browsing latest articles
Browse All 9 View Live




Latest Images