Shouldn't the result of the c# typeof() operator be considered "const"? #77464
-
Currently, it's not possible to use a Are there any cases where On the other hand, if cases exist where the result of Exampleusing System.Xml.Linq;
void f(Type t)
{
switch (t)
{
case typeof(XText):
break;
case typeof(XComment):
break;
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
dotnet/csharplang#356 proposes to allow switching on a |
Beta Was this translation helpful? Give feedback.
dotnet/csharplang#356 proposes to allow switching on a
System.Type
.