Archiv der Kategorie: C#

Linq vs Loop: Join

Like in the previous article of this series I want to compare Linq with a classical loop. This time we want to look at data objects which shall be joined to create a result. Again we want to use validated … Weiterlesen

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

Linq vs Loop: Nested Loop

Like in the previous article of this series I want to compare Linq with a classical loop. This time we want to look at the use case to handle data which contains nested data. Again we want to use validated … Weiterlesen

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

Design patterns: Composite

The composite design pattern is used to compose objects into a tree structure. So each element can hold a list of sub elements. Optional it may have a link to the parent object within the tree. Within the following example … Weiterlesen

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

Crash course: Asynchronous Programming with async and await

With the .NET Framework 4.5 the new keywords “async” and “await” were introduced. These keywords will aloe an asynchronous programming which is nearly as easy as synchronous programming. With this article I want to give you a crash course into … Weiterlesen

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

Design patterns: Singleton

By using the Singleton design pattern you ensure that a class has only one instance. The instance operation is provided by the class itself. So it maintains its own unique instance. The .NET framework offers a very simple and thread-safe … Weiterlesen

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

Design patterns: Proxy

The idea of the Proxy design pattern is to provide a substitute for another object were the substitute controls the access to the other project. So there is one real subject with a given interface, for example an object to … Weiterlesen

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

Write clean code instead of comments

Of course comments help to understand code. They are an essential part of the source code. But comments are an addition only. If you want to create readable and easy to understand source code, you have to focus on the … Weiterlesen

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