Skip to content

[C# 14-Fundamentals and reference]: New Feature - nameof supports unbound generic types #44182

@BillWagner

Description

@BillWagner

Visual Studio release

17.13.p3

Link to speclet

Link to Pull request

New behavior

This was actually merged in VS17.3.p2.

Unbound generic types, such as List<> can be used in nameof expressions. The nameof(List<>) expression evaluates to List.

Language reference tasks

  • Update the nameof page.

Note that the merge PR didn't add any new error codes. There's no corresponding issue for updating compiler errors and messages.

Everyday C# tasks

No response


Associated WorkItem - 370946

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions