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 – operators. With .NET 7, numeric types implement many new interfaces. This C# 11 feature is not only about math! The new IParsable and ISpanParsable interfaces allow creating objects from strings. As these interfaces can be used with constraints in generic types, parsing strings to create objects is now an easy task with generic implementations. This article shows implementing both the string and the Span version of the parse interfaces and using them with generic types. Continue reading Converting Strings to .NET Objects – IParsable and ISpanParsable
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 table, and to convert a collection to a store a single string in the database. #dotnet #efcore Continue reading EF Core Mapping with TpH, Generic Types and Value Conversion
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 Parallel Library (TPL) and C# 5 added the async and await keywords. Together with these enhancements of .NET, and the synchronization context, invoking methods that make use of different threads has becoming a lot easier. Continue reading What’s the SynchronizationContext used for?
The last time the [Thrive conference](https://thriveconf.com) was held was in 2019. Now it’s happening again May, 24-25 2022 in Bistrica, Slovenia. I’m excited to give two presentations and a one-day workshop. Are you attending in-person? Continue reading Thrive Conference in Slovenia
The new edition of my book is available – covering .NET, C#, WinUI, ASP.NET Core, EF Core, and more! Compared to the previous edition, it not only covers the newest editions of C# and .NET, you don’t have to carry a book with 1500 pages – the number of pages have been reduced – but I made sure that all the important topics are covered, you shouldn’t miss anything important topics needed to develop applications with .NET, C#, and Microsoft Azure. Continue reading Professional C# and .NET – 2021 Edition
C# allows writing code with positional or nominal code style. Using positional code style, constructors can be used. Object initializer … Continue reading C# 9 – Positional or Nominal Creation
I had some great days at BASTA! in Mainz, Germany – with three presentations. Thank you for attending my presentations! I hope to see you next year again! My presentations and source code is now available for download!
* C# – What’s next?
* Reference semantics with C# and .NET Core
* Desktop Bridge – One way to build modern apps with WPF Continue reading Presentations and Source Code for BASTA! in Mainz, 2018
The next edition of Professional C# – Professional C# 7 and .NET Core 2.0 is available – covering C# 7 … Continue reading Professional C# 7 and .NET Core 2.0
I already blogged about some cool new C# 7.0 features in the last months. Now I’m offering an additional chapter … Continue reading C# 7.0 – What’s New
I already explained binary literals, digit separators, tuples, out vars and ref returns, and expression bodied members – great new … Continue reading C# 7.0 – Pattern Matching