C# 7.1 : New Features With Example

Recently, Microsoft released a new version of C# which is C# 7.1 with Visual Studio 2017 update 3. It is a minor release so it has few features. The features are async Main method, default, infer tuple name and pattern matching with generics. This article intends to explain these features with examples. Configure C# Language… Continue Reading C# 7.1 : New Features With Example

Func, Action And Local Function in C#

This article intends to demonstrate two Func and Action generic delegates and Local function in C# 7.0. The Func and Action are already available in C# while Local function is introduced in C# 7.0. These three methods are used to in another method internally as per requirements. The below table demonstrates about each method. #… Continue Reading Func, Action And Local Function in C#

Expression Bodied Members In C#

The Expression-bodied member feature introduced in C# 6. It is enhanced in C# 7 to allow expression bodied member with constructor and destructor. Expression-bodied means method or property body write as an expression. We can use expression body in following cases. When a method returns single value or void. The method has a single expression… Continue Reading Expression Bodied Members In C#

Pattern Matching In C#

This article introduces new features of the Pattern Matching in C# 7.0. The C# 7 introduced pattern matching in two cases, the is expression and the switch statement. Pattern matching has following two advantages. Pattern matching can be performed on any data types. These can be user defined and primitive type. Pattern matching can extract… Continue Reading Pattern Matching In C#