C # keywords

Source: Internet
Author: User

 

A keyword is a predefined identifier reserved for the compiler. They cannotProgramIs used as an identifier, unless they have@Prefix. For example,@ IfIs a valid identifier,IfNo, becauseIfIs a keyword.

The keywords listed in the first table in this topic are reserved identifiers in any part of the C # program. The second table in this topic lists the context keywords in C. A context keyword has a special meaning only in the context of a restricted program and can be used as an identifier outside the context. Generally, when adding new keywords to the C # language, they are also added as context keywords to avoid damaging programs written in earlier versions of the language.

Abstract

As

Base

Bool

Break

Byte

Case

Catch

Char

Checked

Class

Const

Continue

Decimal

Default

Delegate

Do

Double

Else

Enum

Event

Explicit

Extern

False

Finally

Fixed

Float

For

Foreach

Goto

If

Implicit

In

In (generic modifier)

Int

Interface

Internal

Is

Lock

Long

Namespace

New

Null

Object

Operator

Out

Out (generic modifier)

Override

Params

Private

Protected

Public

Readonly

Ref

Return

Sbyte

Sealed

Short

Sizeof

Stackalloc

Static

String

Structure

Switch

This

Throw

True

Try

Typeof

Uint

Ulong

Unchecked

Unsafe

Ushort

Using

Virtual

Void

Volatile

While

 
Context keyword

The context keyword is used to provideCodeBut it is not a reserved word in C. Some context keywords (suchPartialAndWhere) Has a special meaning in two or more contexts.

Add

Alias

Ascending

Descending

Dynamic

From

Get

Global

Group

Into

Join

Let

Orderby

Partial (type)

Partial (method)

Remove

Select

Set

Value

VaR

Where (generic type constraints)

Where (query clause)

Yield

 
See

Converted from msdn original http://msdn.microsoft.com/zh-cn/library/x53a06bb.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.