Blog Posts with tag "CSharp"

Task.Run vs. TaskFactory.StartNew

Task.Run vs. TaskFactory.StartNew

When working with asynchronous or parallel code in C#, you’ll inevitably encounter two common ways to start tasks: Task.Run and TaskFactory.StartNew. At first glance, they seem similar - but they behave differently and …

Read Blog Post
When to use records in C#

When to use records in C#

For several years now, C# has supported Records as a new “type”. Initially only for classes (which is why the class is optional for a record class), later also for structs. Records are specially designed for use as data …

Read Blog Post
Sustainable Code with .NET 9

Sustainable Code with .NET 9

Sustainable Code is a constantly growing GitHub repository created by me , in which I collect various everyday code snippets and measure the performance of the different implementation ways. The goal is to create a …

Read Blog Post
Handle Yaml Files with .NET

Handle Yaml Files with .NET

YAML files are unfortunately part of everyday life for all developers these days; and although they are very error-prone and almost impossible to edit without an IDE and schema information without constantly running into …

Read Blog Post
.NET Event Counters

.NET Event Counters

.NET event counters are a relatively new API for collecting metrics from .NET applications. They are part of the EventSource and EventCounter namespace since .NET (Core) 3.0.

Read Blog Post
.NET Naming Best Practises: DTOs

.NET Naming Best Practises: DTOs

Often seen, often used incorrectly: DTOs. Data Transfer Objects. In principle, DTO is an umbrella term, a design pattern that is used to transfer data between. In reality, however, the umbrella term is used directly as …

Read Blog Post
Statische Methoden in C# / .NET

Statische Methoden in C# / .NET

Statische Methoden in C# sind Methoden, die auf eine Klasse und nicht auf eine bestimmte Instanz einer Klasse angewendet werden. Sie können aufgerufen werden, ohne dass zuvor eine Instanz der Klasse erstellt wurde. Ein …

Read Blog Post