关闭

C# Keywords

标签: KeywordsC#
306人阅读 评论(0) 收藏 举报
分类:


Keywords are predefined, reserved identifiersthat have special meanings to the compiler. They cannot be used as identifiersin your program unless they include @ as a prefix. For example, @if is a valid identifier but if is not because if is a keyword.

Thefirst table in this topic lists keywords that are reserved identifiers in anypart of a C# program. The second table in this topic lists the contextualkeywords in C#. Contextual keywords have special meaning only in a limitedprogram context and can be used as identifiers outside that context. Generally,as new keywords are added to the C# language, they are added as contextualkeywords in order to avoid breaking programs written in earlier versions.

 

 

Contextual Keywords

 

A contextual keyword is used to provide a specific meaning in thecode, but it is not a reserved word in C#. Some contextual keywords, such as partial and where, have specialmeanings in two or more contexts.

 

1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2695次
    • 积分:58
    • 等级:
    • 排名:千里之外
    • 原创:1篇
    • 转载:10篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档