C# Keywords



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.

 

阅读更多
文章标签: Keywords C#
个人分类: C#
上一篇System.Web Namespaces
下一篇Office 365 Service Communications API operations--Get Services
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭