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#

Ref Return and Ref Local In C#

This article intends to demonstrate new features Ref Return and Ref Local In C# 7.0. The ref is used to be passed as a argument in the method. It enhanced with return and uses returned value later in the method using ref return and ref local. Ref: It uses to pass an argument to a… Continue Reading Ref Return and Ref Local In C#

SOLID – Single Responsibility Principle With C#

The Single Responsibility Principle is one of the SOLID design principles. We can define it in following ways: A reason to change: A class or method should have only one reason to change. Single Responsibility: A class or method should have only a single responsibility. When a class has more than one responsibility, there are… Continue Reading SOLID – Single Responsibility Principle With C#