Store Data of Your Blazor App in the Local Storage and in the Session Storage

To store local data, today's browsers support a local storage and a session storage. The difference between the two is that the session storage is only available per tab, and the stored data is deleted once you close the tab with the application. The local storage on the other side stores data across sessions. Even when you close the browser and when you re-open it again, the data of the local storage is still there. It will be there as long until you delete it.

So, the difference between the two is how long the data is stored. Beside that, they work exactly the same. Both can store key/value pairs, and those key/value pairs are stored in plain text.

In this blog post, let's look at how to use the local storage and the session storage in your Blazor App.

(more…)
Read more...

Using Tuples in C# to Initialize Properties in the Constructor and to Deconstruct Your Object

Recently I was asked by a developer what this code block here actually is:

public Friend(string firstName, string middleName, string lastName)
  => (FirstName, MiddleName, LastName) = (firstName, middleName, lastName);

This is actually a constructor that uses an expression body and tuples.

(more…)
Read more...

C# 9.0: Covariant Return Types – Specify More Specific Return Types in Overridden Methods and Properties

In the previous blog posts you learned about different C# 9.0 features:

In this blog post, let's look at another very interesting feature of C# 9.0, the covariant return types.

(more…)
Read more...

What is Actually the Universal Windows Platform and what is WinUI, MSIX, and Project Reunion?

This morning I got a wonderful message from a very smart and great person who watched my latest Pluralsight course, Fundamentals of Building .NET Desktop Applications. The course explains the .NET UI frameworks Windows Forms, WPF, UWP, WinUI (including Uno platform), and .NET MAUI in an overview and shows how to build your first .NET Desktop Apps for Windows with WinUI, WPF, and Windows Forms. The structure of the course is like this:

  • Knowing the UI frameworks for .NET Desktop Apps
  • Creating Your First WinUI App
  • Building Your First WPF App
  • Writing Your First Windows Forms App
(more…)
Read more...