C# Keywords

转载 2015年11月19日 13:41:10


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.

 

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

struct

switch

this

throw

true

try

typeof

uint

ulong

unchecked

unsafe

ushort

using

virtual

void

volatile

while

 

 

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.

 

add

alias

ascending

async

await

descending

dynamic

from

get

global

group

into

join

let

orderby

partial (type)

partial (method)

remove

select

set

value

var

where (generic type constraint)

where (query clause)

yield

 

 

C# Keywords.pdf

  • 2008年01月13日 22:44
  • 58KB
  • 下载

C# Keywords Series 6 in(Generic Modifier)&out(Generic Modifier)

本篇文章主要讲述 in 和 out 两个泛型参数修饰符。对于这两个关键字,楼主也是各种不懂,要学会使用这两个关键字,必须先理解协变和逆变的概念。   协变和逆变   简单定义就是:协变就是泛型接口...

C# 获取网页标题title、keywords、description 的代码(winform)

C# 获取网页标题title、keywords、description 的代码(winform版本,.net版本照样可以用) using System; using System.Collec...
  • hnliwh
  • hnliwh
  • 2011年12月19日 15:40
  • 1230

C# Keywords Series 8 interface&virtual&abstract&override&new

本文主要讲述 interface 、 virtual 、 abstract、override、new(修饰符) 的使用方法和区别。   interface   interface 只能包含方法、属...

C# Keywords Series 5 explicit&implicit&operator

本篇文章主要讲述C#当中的转换关键字,explicit&implicit&operator。大半月没怎么更新博客,楼主最近回家看爹娘了,回来继续DOTNET之旅。    Operator op...

drupal-7.12 for find keywords.zip

  • 2012年04月09日 01:08
  • 3.38MB
  • 下载

Keywords for American Cultural Studies

  • 2014年09月16日 04:19
  • 1.16MB
  • 下载

【HDU2222】【AC自动机模板 测烂为止】Keywords Search

传送门:HDU222 描述: Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/1310...

keywords_cuteseo SEO工具

  • 2009年05月13日 11:44
  • 3.46MB
  • 下载

keywords查询工具

  • 2008年10月22日 22:10
  • 3.43MB
  • 下载
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:C# Keywords
举报原因:
原因补充:

(最多只允许输入30个字)