Archiv des Autors: oliverfunke

Auto Type Deduction in Range-Based For Loops

Range-based For Loops offer a nice way to loop over the elements of a container. In combination with Auto Type Deduction the source code will become very clean and easy to read and write. The Auto Type Deduction is available … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

C# Protected Internal vs Private Protected

C# offers the composed access modifiers “protected internal”. With C# 7.2 a new composed access modifier was added: “private protected”. Unfortunately, these modifiers are hard to understand as their names don’t reflect their meaning. Within this article I want to … Weiterlesen

Veröffentlicht unter .NET, C# | Kommentar hinterlassen

Ref Return and Ref Locals in C# 7

The C# language supports passing arguments by value or by reference since the first language version. But returning a value was possible by value only. This has been changed in C# 7 by introducing two new features: ref returns and … Weiterlesen

Veröffentlicht unter .NET, C# | Kommentar hinterlassen

Pattern Matching in C# 7

Patterns are used to test whether a value matches a specific expectation and if it matches patterns allow to extract information from the value. You already create such pattern matchings by writing if and switch statements. With these statements you … Weiterlesen

Veröffentlicht unter .NET, C# | Kommentar hinterlassen

C++17: initializers in if-statement and switch-statement

With C++17 it is possible to initialize a variable inside an if-statement and a switch-statement. We already know and use this concept in the for-statement. To be honest: I don’t like this feature. Within this article I want to introduce … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Name hiding in inheritance

The C++ name hiding rules for variables are well known by software developers. In contrast, name hiding in inheritance sometimes leads to issues although it follows the same rules. Such issues are therefore not a result of the rules but … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Expression Bodied Members in C# 7

The concept of Expression Bodied Members (EBM) was introduced with C# 6 and as it becomes popular, many enhancements were added with C# 7. Within this article I want to give you the full picture of this feature so I … Weiterlesen

Veröffentlicht unter .NET, C# | Kommentar hinterlassen