Enforcing C# 7’s code style & latest coding patterns using EditorConfig in Visual Studio 2017
EditorConfig for enforcing code style EditorConfig can be used to define and maintain...
EditorConfig for enforcing code style EditorConfig can be used to define and maintain...
C# 8’s new proposed enhancements In C# 8 following language enhancements are...
Proposed features & enhancements in C# 7.2: Non-trailing named arguments Currently, a...
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,...
Deconstruction in C# 7 Deconstruction feature can be used to consume tuples....
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
1 2 3 4 5 6 7 |
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...