C# Enums with reserved keywords

前端 未结 1 390
迷失自我
迷失自我 2020-12-17 08:13

I\'m opening old C# code from my work using Reflector and I found out that there was an enum in an SQL class which looked like this:

public enum Column
{
            


        
1条回答
  •  执笔经年
    2020-12-17 08:54

    You need to prefix with a character literal (@ symbol) in order to use keywords.

    MSDN (Thanks @erikH)

    0 讨论(0)
提交回复
热议问题