Steven Giesel 5/28/2023

nameof get's a bit better in C# 12

Read Original

This article details the improvement to the `nameof` operator in C# 12, which now allows accessing instance members (like `SomeProperty.Length`) from a static context. It explains the feature, shows the required preview language version configuration, and provides a practical code example.

nameof get's a bit better in C# 12

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser