• Home
  • Blog
  • About me
  • Courses
  • Articles
  • Talks
  • Books
  • Contact
  • Home
  • Blog
  • About me
  • Courses
  • Articles
  • Talks
  • Books
  • Contact
25MarMarch 25, 2021

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

Thomas Claudius Huber2021-03-25T17:41:37+02:00

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…)
By Thomas Claudius Huber.NET, C#6 Comments
Read more...
11MarMarch 11, 2021

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

Thomas Claudius Huber2021-07-07T09:19:37+02:00

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

  • Top-level statements
  • Init-only properties
  • Records
  • Target-typed new expressions
  • Improved Pattern Matching
  • Pattern Matching in Switch Expressions

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

(more…)
By Thomas Claudius Huber.NET, C#0 Comments
Read more...
Video course
Git for Beginners
Pluralsight course
C# 10 Unit Testing
Pluralsight course
Blazor and EF Core
Pluralsight course
WPF 6 Fundamentals
Pluralsight course
WinUI 3 Fundamentals
Pluralsight course
.NET 6 Desktop Development
All my Pluralsight courses
  • .NET Blog
  • Ela Mościcka
  • Charlin Agramonte
  • Brock Allen
  • Dominick Baier
  • Laurent Bugnion
  • Manuel Meyer
  • Philipp Salvisberg
  • René Schulte
  • Roger Troller
  • Scott Hanselman
© Copyright 2023 - Thomas Claudius Huber