dotnet/roslyn

Make a built-in symbol for the nameof() operator

Open

#373 aperta il 10 feb 2015

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugLanguage-C#Language-VBhelp wanted

Metriche repository

Star
 (20.414 star)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

The compiler already provides symbols for built-in operators such as +(int,int). I think this would be one of those built-in operators, probably something like

public string nameof(object arg);

even though the argument might be something like a namespace.

This would (only) be visible through the SemanticModel API.

[Ported from TFS DevDiv 1078941]

Guida contributor