how to escape key words in c#?

后端 未结 3 1563
名媛妹妹
名媛妹妹 2020-12-17 21:25

I want to do the equivalent of the following VB in c#

Function([class]) \"hello\"

This would be the same as this in c#

<         


        
3条回答
  •  不知归路
    2020-12-17 22:04

    You can prefix any keyword with a @.

    But I don't think it's a recommended practice, and code analysis complains about it for sure.

提交回复
热议问题