Archiv des Autors: oliverfunke

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

C# Array indexer vs. List indexer

The C# CLR contains a lot of nice collection classes. They are optimized for their individual use case. But from a common perspective they all have the same behavior we expect from a collection. But there is one exception from … Weiterlesen

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

Object Instance Creation

Whenever you write an application in C++ you will create a lot of object instances. So, this is a base development task. C++ offers several ways to initialize variables. These are not just syntactical variations for the same task. The … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

ctor types in C++

In C++ you will find several ways to initialize an object instance. For example, think about a class “MyClass” which can be constructed with a parameter. The object initialization can be done in several ways: MyClass x{y}; MyClass x(y); MyClass … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Discard of return values and out parameters in C# 7

C# 7 allows to discard return values and out parameters. The underscore character is used as wildcard for these not required values. The following source code shows an example of a function call where the caller wants to ignore the … Weiterlesen

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

Tuples in C# 7 (ValueTuple)

Within this article I want to give a short overview over the new Tuple features in C# 7. So far, we already had a Tuple class in C#.  But with the new one some technical details have changed and some … Weiterlesen

Veröffentlicht unter C# | Kommentar hinterlassen

Software Transactional Memory

One of the main challenges in multithreading applications is the access to shared memory. In case you have several software-components which want to read and write to shared memory you must synchronize these data access. The concept of Software Transactional … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

std::atomic

Within multithreading applications even trivial functions like reading and writing values may create issues. The std::atomic template can be used in such situations. Within this article I want to give a short introduction into this topic.   Atomic operations Let’s … Weiterlesen

Veröffentlicht unter C++ | Kommentar hinterlassen

Deconstruction in C# 7

C# 7 introduces a nice syntax to deconstruct a class and access all members. If you want to support deconstruction for an object you just must write a “Deconstruct” method which contains one or more out parameter which are used … Weiterlesen

Veröffentlicht unter C# | 1 Kommentar