C# 14 in the preview allows an unbound generic type as an argument to nameof.
For example, nameof(List<>) returns List.
Previously, you could pass only closed generic types, such as List<int>, to return List.
C# 14 in the preview allows an unbound generic type as an argument to nameof.
For example, nameof(List<>) returns List.
Previously, you could pass only closed generic types, such as List<int>, to return List.
If you have a fediverse account, you can quote this note from your own instance. Search https://dotnet.social/users/okyrylchuk/statuses/115371935123769822 on your instance and quote it. (Note that quoting is not supported in Mastodon.)