.NET, Design

Abolishing Switch-Case Statement and Pattern Matching in C# 7.0

There are many arguments on the web regarding the switch-case statement. It seems that half of the programmers think that switch-case statement is actually an anti-pattern, and other half claims there are in fact use cases for this concept. Usually, the second group tries to prove a point that in some simple situations it is alright… Continue reading Abolishing Switch-Case Statement and Pattern Matching in C# 7.0

.NET

Tuples in .NET world and C# 7.0 improvements

Back in the day when I was a young developer, I was using output parameters. Then I figured out it is somewhat complicated to test functions with output parameters, and that their use is clunky at best. Also, out parameters don't work with async function, because of CLR limitations. In general, I liked them less… Continue reading Tuples in .NET world and C# 7.0 improvements