EditorConfig for enforcing code style EditorConfig can be used to define and maintain...
Category: C Sharp
C# 8’s new proposed enhancements In C# 8 following language enhancements are...
For using C# 7.1, set Language Version to “C# latest minor version(latest)”...
C# 7’s Local Functions 1. Overloading not supported. 2. Accessibility modifier (public,...
New C# 7 features in action: Deconstruction in C# 7 – deconstructing declaration, deconstructing assignment, deconstructor method and discards in deconstruction.
Deconstruction in C# 7 Deconstruction feature can be used to consume tuples....
New C# 7 features in action: Tuples in C# 7 – tuple types and tuple literals. Sample code for demonstrating the use of Dictionary with values of type Tuple
Tuples enhancements in C# 7 A. tuple types Some example of the...
Switch statement with C# 7’s pattern matching enhancements Switch on any type
public static bool DoPayment(object creditCard, decimal amount)
switch (creditCard) // // Switch on any type, here creditCard is of type object
// Some code.
Patterns in C# 7.0 Constant patterns (c): checks that the input is equal...
Before C# 7, for calling a method with out parameters, we were...