Part 5 in a series on new language features in C# 12.

C# logo

Alias any type

Now you can create aliases for any type - it doesn't need to have a name. Tuples are a great example, but also arrays.

using P = Tuple<string, string, int>;
using C = char[];

Further reading

https://learn.microsoft.com/dotnet/csharp/language-reference/proposals/csharp-12.0/using-alias-types?WT.mc_id=DOP-MVP-5001655

Example source

https://github.com/flcdrg/csharp-12/blob/main/05-alias/Aliases.cs