C# 14 · Basics
Get a name as a string
Refer to variables and members without hard-coding their names.
ArgumentNullException.ThrowIfNull(user);
Console.WriteLine(nameof(user));
C# 14 · Basics
Refer to variables and members without hard-coding their names.
ArgumentNullException.ThrowIfNull(user);
Console.WriteLine(nameof(user));
Was this page helpful?