Quantcast
Channel: CSharp – csharp.christiannagel.com
Browsing latest articles
Browse All 18 View Live

Alignment with C# 8 Switch Expressions

Recently I’ve written two blog articles about the new C# 8 switch expression. I’ve changed my last blog article to …

View Article



Async Streaming with ASP.NET Core SignalR and C# 8

ASP.NET Core SignalR version 2.1 offers streaming from the server to the client. Using ASP.NET Core 3.0, streams can also …

View Article

Image may be NSFW.
Clik here to view.

How Hello World! changed – top level statements and functions (C# 9)

C# 9 comes with many new features to enhance productivity and fix bugs. One productivity enhancement comes for small programs and learning C#: top level statements. This also allows for a new way to...

View Article

Image may be NSFW.
Clik here to view.

C# 8 Updates

For all my readers of Professional C# 7 and .NET Core 2 I’ve uploaded the new bonus chapter 6 with C# 8 updates! This bonus chapter covers these C# 8 features: Nullable reference types Using...

View Article

Image may be NSFW.
Clik here to view.

C# Nullable Features thru the times

Exceptions of type NullReferenceException are the most common errors with .NET applications. With C# 8, nullable reference types have been introduced to get rid of these exceptions. The new .NET 6 and...

View Article


Image may be NSFW.
Clik here to view.

Upgrading an ASP.NET Core Web API Project to .NET 6

Upgrading an ASP.NET Core 5 application to .NET 6, all what needs to be done is to change the project file for .NET 6, and update the NuGet packages to the new versions, and you’re done and can build...

View Article

Image may be NSFW.
Clik here to view.

What’s the SynchronizationContext used for?

Creating Windows applications, UI controls are bound to the UI thread. .NET made it to different iterations with different patterns dealing with asynchronous programming. .NET 4.0 introduced the Task...

View Article

Image may be NSFW.
Clik here to view.

EF Core Mapping with TpH, Generic Types and Value Conversion

EF Core has powerful options to map your domain model to a relational database. In this article, I’ll show you how to use the Fluent API to configure a hierarchy of generic classes to map to a single...

View Article


Image may be NSFW.
Clik here to view.

Primary Constructors with C#

To reduce the syntax needed when writing C# code, C# 9 added records with primary constructors. C# 10 then added records for structs. Using C# 12 you can create classes with primary constructors. This...

View Article


Image may be NSFW.
Clik here to view.

Converting Strings to .NET Objects – IParsable and ISpanParsable

A new feature of C# 11 allows abstract static members with interfaces. This makes it possible to define class methods to be used as a contract with a generic class implementation, e.g. using + and –...

View Article
Browsing latest articles
Browse All 18 View Live




Latest Images