元素节点列表 (
引用关系 )
规范定义
block
;
get-accessor-declaration set-accessor-declaration opt
set-accessor-declaration get-accessor-declaration opt
protected
internal
private
protected internal
internal protected
attributes opt add block
multiplicative-expression
additive-expression + multiplicative-expression
additive-expression - multiplicative-expression
equality-expression
and-expression & equality-expression
expression
block
ref
out
explicit-anonymous-function-signature
implicit-anonymous-function-signature
delegate explicit-anonymous-function-signature opt block
new anonymous-object-initializer
{ member-declarator-list opt }
{ member-declarator-list , }
expression
ref variable-reference
out variable-reference
argument
argument-list , argument
new non-array-type [ expression-list ] rank-specifiers opt array-initializer opt
new array-type array-initializer
new rank-specifier array-initializer
{ variable-initializer-list opt }
{ variable-initializer-list , }
non-array-type rank-specifiers
unary-expression assignment-operator expression
=
+=
-=
*=
/=
%=
&=
|=
^=
<<=
right-shift-assignment
*
asterisks *
attribute-name attribute-arguments opt
expression
( positional-argument-list opt )
( positional-argument-list , named-argument-list )
( named-argument-list )
attribute
attribute-list , attribute
type-name
attribute-sections
[ attribute-target-specifier opt attribute-list ]
[ attribute-target-specifier opt attribute-list , ]
attribute-section
attribute-sections attribute-section
field
event
method
param
property
return
type
attribute-target :
An identifier-or-keyword that is not a keyword
base . identifier
base [ expression-list ]
type operator overloadable-binary-operator ( type identifier , type identifier )
{ statement-list opt }
expression
true
false
break ;
( type ) unary-expression
specific-catch-clauses general-catch-clause opt
specific-catch-clauses opt general-catch-clause
single-character
simple-escape-sequence
hexadecimal-escape-sequence
unicode-escape-sequence
' character '
checked ( expression )
checked block
: class-type
: interface-type-list
: class-type , interface-type-list
{ class-member-declarations opt }
attributes opt class-modifiers opt partialopt class identifier type-parameter-list opt class-base opt type-parameter-constraints-clauses opt class-body ;opt
constant-declaration
field-declaration
method-declaration
property-declaration
event-declaration
indexer-declaration
operator-declaration
constructor-declaration
destructor-declaration
static-constructor-declaration
type-declaration
class-member-declaration
class-member-declarations class-member-declaration
new
public
protected
internal
private
abstract
sealed
static
class-modifier
class-modifiers class-modifier
type-name
object
string
{ element-initializer-list }
{ element-initializer-list , }
A Unicode character of classes Mn or Mc
A unicode-escape-sequence representing a character of classes Mn or Mc
,
commas ,
single-line-comment
delimited-comment
extern-alias-directives opt using-directives opt global-attributes opt
namespace-member-declarations opt
inclusive-or-expression
conditional-and-expression && inclusive-or-expression
null-coalescing-expression
null-coalescing-expression ? expression : expression
conditional-and-expression
conditional-or-expression || conditional-and-expression
input-section
skipped-section
Any identifier-or-keyword except true or false
A Unicode character of the class Pc
A unicode-escape-sequence representing a character of the class Pc
attributes opt constant-modifiers opt const type constant-declarators ;
identifier = constant-expression
identifier = constant-expression
constant-declarator
constant-declarators , constant-declarator
constant-declarator
constant-declarators , constant-declarator
expression
new
public
protected
internal
private
constant-modifier
constant-modifiers constant-modifier
block
;
new ( )
attributes opt constructor-modifiers opt constructor-declarator constructor-body
identifier ( formal-parameter-list opt ) constructor-initializer opt
: base ( argument-list opt )
: this ( argument-list opt )
public
protected
internal
private
extern
constructor-modifier
constructor-modifiers constructor-modifier
continue ;
implicit operator type ( type identifier )
explicit operator type ( type identifier )
one of
0 1 2 3 4 5 6 7 8 9
A Unicode character of the class Nd
A unicode-escape-sequence representing a character of the class Nd
decimal-digit
decimal-digits decimal-digit
decimal-digits integer-type-suffix opt
local-variable-declaration ;
local-constant-declaration ;
default ( type )
new delegate-type ( expression )
attributes opt delegate-modifiers opt delegate return-type identifier type-parameter-list opt ( formal-parameter-list opt ) type-parameter-constraints-clauses opt ;
new
public
protected
internal
private
delegate-modifier
delegate-modifiers delegate-modifier
type-name
/* delimited-comment-text opt asterisks /
/
asterisks opt not-slash-or-asterisk
delimited-comment-section
delimited-comment-text delimited-comment-section
block
;
attributes opt externopt ~ identifier ( ) destructor-body
,
dim-separators ,
do embedded-statement while ( boolean-expression ) ;
primary-no-array-creation-expression [ expression-list ]
non-assignment-expression
{ expression-list }
element-initializer
element-initializer-list , element-initializer
block
empty-statement
expression-statement
selection-statement
iteration-statement
jump-statement
try-statement
checked-statement
unchecked-statement
lock-statement
using-statement
yield-statement
;
: integral-type
{ enum-member-declarations opt }
{ enum-member-declarations , }
attributes opt enum-modifiers opt enum identifier enum-base opt enum-body ;opt
attributes opt identifier
attributes opt identifier = constant-expression
enum-member-declaration
enum-member-declarations , enum-member-declaration
new
public
protected
internal
private
enum-modifier
enum-modifiers enum-modifier
type-name
relational-expression
equality-expression == relational-expression
equality-expression != relational-expression
add-accessor-declaration remove-accessor-declaration
remove-accessor-declaration add-accessor-declaration
attributes opt event-modifiers opt event type variable-declarators ;
attributes opt event-modifiers opt event type member-name { event-accessor-declarations }
new
public
protected
internal
private
static
virtual
sealed
override
abstract
extern
event-modifier
event-modifiers event-modifier
and-expression
exclusive-or-expression ^ and-expression
anonymous-function-parameter-modifier opt type identifier
explicit-anonymous-function-parameter
explicit-anonymous-function-parameter-list , explicit-anonymous-function-parameter
( explicit-anonymous-function-parameter-list opt )
e sign opt decimal-digits
E sign opt decimal-digits
non-assignment-expression
assignment
expression
expression-list , expression
statement-expression ;
extern alias identifier ;
extern-alias-directive
extern-alias-directives extern-alias-directive
attributes opt field-modifiers opt type variable-declarators ;
new
public
protected
internal
private
static
readonly
volatile
field-modifier
field-modifiers field-modifier
" file-name-characters "
Any input-character except "
file-name-character
file-name-characters file-name-character
finally block
attributes opt parameter-modifier opt type identifier
fixed-parameter
fixed-parameters , fixed-parameter
float
double
boolean-expression
foreach ( local-variable-type identifier in expression ) embedded-statement
local-variable-declaration
statement-expression-list
statement-expression-list
fixed-parameters
fixed-parameters , parameter-array
parameter-array
A Unicode character of the class Cf
A unicode-escape-sequence representing a character of the class Cf
for ( for-initializer opt ; for-condition opt ; for-iterator opt ) embedded-statement
from type opt identifier in expression
catch block
< commas opt >
attributes opt accessor-modifier opt get accessor-body
global-attribute-sections
[ global-attribute-target-specifier attribute-list ]
[ global-attribute-target-specifier attribute-list , ]
global-attribute-section
global-attribute-sections global-attribute-section
assembly
module
global-attribute-target :
goto identifier ;
goto case constant-expression ;
goto default ;
group expression by expression
\x hex-digit hex-digit opt hex-digit opt hex-digit opt
0x hex-digits integer-type-suffix opt
0X hex-digits integer-type-suffix opt
one of
0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
hex-digit
hex-digits hex-digit
available-identifier
@ identifier-or-keyword
identifier-start-character identifier-part-characters opt
letter-character
decimal-digit-character
connecting-character
combining-character
formatting-character
identifier-part-character
identifier-part-characters identifier-part-character
letter-character
_ (the underscore character U+005F)
if ( boolean-expression ) embedded-statement
if ( boolean-expression ) embedded-statement else embedded-statement
identifier
implicit-anonymous-function-parameter
implicit-anonymous-function-parameter-list , implicit-anonymous-function-parameter
( implicit-anonymous-function-parameter-list opt )
implicit-anonymous-function-parameter
exclusive-or-expression
inclusive-or-expression | exclusive-or-expression
attributes opt indexer-modifiers opt indexer-declarator { accessor-declarations }
type this [ formal-parameter-list ]
type interface-type . this [ formal-parameter-list ]
new
public
protected
internal
private
virtual
sealed
override
abstract
extern
indexer-modifier
indexer-modifiers indexer-modifier
expression
object-or-collection-initializer
input-section opt
Any Unicode character except a new-line-character
input-character
input-characters input-character
whitespace
comment
token
input-element
input-elements input-element
input-section-part
input-section input-section-part
input-elements opt new-line
pp-directive
decimal-integer-literal
hexadecimal-integer-literal
one of
U u L l UL Ul uL ul LU Lu lU lu
sbyte
byte
short
ushort
int
uint
long
ulong
char
attributes opt get ;
attributes opt set ;
attributes opt get ; attributes opt set ;
attributes opt set ; attributes opt get ;
: interface-type-list
{ interface-member-declarations opt }
attributes opt interface-modifiers opt partialopt interface identifier type-parameter-list opt interface-base opt type-parameter-constraints-clauses opt interface-body ;opt
attributes opt newopt event type identifier ;
attributes opt newopt type this [ formal-parameter-list ] { interface-accessors }
interface-method-declaration
interface-property-declaration
interface-event-declaration
interface-indexer-declaration
interface-member-declaration
interface-member-declarations interface-member-declaration
attributes opt newopt return-type identifier type-parameter-list ( formal-parameter-list opt ) type-parameter-constraints-clauses opt ;
new
public
protected
internal
private
interface-modifier
interface-modifiers interface-modifier
attributes opt newopt type identifier { interface-accessors }
type-name
interface-type
interface-type-list , interface-type
primary-expression ( argument-list opt )
while-statement
do-statement
for-statement
foreach-statement
join type opt identifier in expression on expression equals expression
join type opt identifier in expression on expression equals expression into identifier
break-statement
continue-statement
goto-statement
return-statement
throw-statement
one of
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 int interface
internal is lock long namespace
new null object operator out
override params private protected public
readonly ref return sbyte sealed
short sizeof stackalloc static string
struct switch this throw true
try type of uint ulong unchecked
unsafe ushort using virtual void
volatile while
identifier : statement
anonymous-function-signature => anonymous-function-body
let identifier = expression
A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl
A unicode-escape-sequence representing a character of classes Lu, Ll, Lt, Lm, Lo, or Nl
decimal-digits whitespace file-name
decimal-digits
default
hidden
boolean-literal
integer-literal
real-literal
character-literal
string-literal
null-literal
const type constant-declarators
local-variable-type local-variable-declarators
identifier
identifier = local-variable-initializer
local-variable-declarator
local-variable-declarators , local-variable-declarator
expression
array-initializer
type
var
lock ( expression ) embedded-statement
primary-expression . identifier type-argument-list opt
predefined-type . identifier type-argument-list opt
qualified-alias-member . identifier
simple-name
member-access
identifier = expression
member-declarator
member-declarator-list , member-declarator
identifier = initializer-value
member-initializer
member-initializer-list , member-initializer
identifier
interface-type . identifier
identifier
interface-type . identifier
block
;
method-header method-body
attributes opt method-modifiers opt partialopt return-type member-name type-parameter-list opt ( formal-parameter-list opt ) type-parameter-constraints-clauses opt
new
public
protected
internal
private
static
virtual
sealed
override
abstract
extern
method-modifier
method-modifiers method-modifier
unary-expression
multiplicative-expression * unary-expression
multiplicative-expression / unary-expression
multiplicative-expression % unary-expression
identifier = attribute-argument-expression
named-argument
named-argument-list , named-argument
{ extern-alias-directives opt using-directives opt namespace-member-declarations opt }
namespace qualified-identifier namespace-body ;opt
namespace-declaration
type-declaration
namespace-member-declaration
namespace-member-declarations namespace-member-declaration
namespace-or-type-name
identifier type-argument-list opt
namespace-or-type-name . identifier type-argument-list opt
qualified-alias-member
Carriage return character (U+000D)
Line feed character (U+000A)
Carriage return character (U+000D) followed by line feed character (U+000A)
Next line character (U+0085)
Line separator character (U+2028)
Paragraph separator character (U+2029)
Carriage return character (U+000D)
Line feed character (U+000A)
Next line character (U+0085)
Line separator character (U+2028)
Paragraph separator character (U+2029)
type
conditional-expression
lambda-expression
query-expression
type
Any input-character except #
Any Unicode character except / or *
non-nullable-value-type ?
conditional-or-expression
conditional-or-expression ?? null-coalescing-expression
null
integral-type
floating-point-type
decimal
new type ( argument-list opt ) object-or-collection-initializer opt
new type object-or-collection-initializer
{ member-initializer-list opt }
{ member-initializer-list , }
object-initializer
collection-initializer
block
;
attributes opt operator-modifiers operator-declarator operator-body
unary-operator-declarator
binary-operator-declarator
conversion-operator-declarator
public
static
extern
operator-modifier
operator-modifiers operator-modifier
one of
{ } [ ] ( ) . , : ;
+ - * / % & | ^ ! ~
= < > ? ?? :: ++ -- && ||
-> == != <= >= += -= *= /= %=
&= |= ^= << <<= =>
orderby orderings
expression ordering-direction opt
ascending
descending
ordering
orderings , ordering
+
-
*
/
%
&
|
^
<<
right-shift
==
!=
>
<
>=
<=
one of
+ - ! ~ ++ -- true false
attributes opt params array-type identifier
ref
out
this
( expression )
attribute-argument-expression
positional-argument
positional-argument-list , positional-argument
primary-expression --
primary-expression ++
pp-equality-expression
pp-and-expression whitespace opt && whitespace opt pp-equality-expression
pp-if-section pp-elif-sections opt pp-else-section opt pp-endif
whitespace opt # whitespace opt define whitespace conditional-symbol pp-new-line
whitespace opt # whitespace opt undef whitespace conditional-symbol pp-new-line
whitespace opt # whitespace opt error pp-message
whitespace opt # whitespace opt warning pp-message
pp-declaration
pp-conditional
pp-line
pp-diagnostic
pp-region
pp-pragma
whitespace opt # whitespace opt elif whitespace pp-expression pp-new-line conditional-section opt
pp-elif-section
pp-elif-sections pp-elif-section
whitespace opt # whitespace opt else pp-new-line conditional-section opt
whitespace opt # whitespace opt endif pp-new-line
whitespace opt # whitespace opt endregion pp-message
pp-unary-expression
pp-equality-expression whitespace opt == whitespace opt pp-unary-expression
pp-equality-expression whitespace opt != whitespace opt pp-unary-expression
whitespace opt pp-or-expression whitespace opt
whitespace opt # whitespace opt if whitespace pp-expression pp-new-line conditional-section opt
whitespace opt # whitespace opt line whitespace line-indicator pp-new-line
new-line
whitespace input-characters opt new-line
whitespace opt single-line-comment opt new-line
pp-and-expression
pp-or-expression whitespace opt || whitespace opt pp-and-expression
whitespace opt # whitespace opt pragma whitespace pragma-body pp-new-line
true
false
conditional-symbol
( whitespace opt pp-expression whitespace opt )
pp-start-region conditional-section opt pp-end-region
whitespace opt # whitespace opt region pp-message
pp-primary-expression
! whitespace opt pp-unary-expression
pragma-warning-body
warning whitespace warning-action
warning whitespace warning-action whitespace warning-list
-- unary-expression
one of
bool byte char decimal double float int long
object sbyte short string uint ulong ushort
++ unary-expression
class-type
class
struct
primary-no-array-creation-expression
array-creation-expression
literal
simple-name
parenthesized-expression
member-access
invocation-expression
element-access
this-access
base-access
post-increment-expression
post-decrement-expression
object-creation-expression
delegate-creation-expression
anonymous-object-creation-expression
typeof-expression
checked-expression
unchecked-expression
default-value-expression
anonymous-method-expression
attributes opt property-modifiers opt type member-name { accessor-declarations }
new
public
protected
internal
private
static
virtual
sealed
override
abstract
extern
property-modifier
property-modifiers property-modifier
identifier :: identifier type-argument-list opt
identifier
qualified-identifier . identifier
query-body-clauses opt select-or-group-clause query-continuation opt
from-clause
let-clause
where-clause
join-clause
join-into-clause
orderby-clause
query-body-clause
query-body-clauses query-body-clause
into identifier query-body
from-clause query-body
""
[ dim-separators opt ]
rank-specifier
rank-specifiers rank-specifier
decimal-digits . decimal-digits exponent-part opt real-type-suffix opt
. decimal-digits exponent-part opt real-type-suffix opt
decimal-digits exponent-part real-type-suffix opt
decimal-digits real-type-suffix
one of
F f D d M m
class-type
interface-type
array-type
delegate-type
" regular-string-literal-characters opt "
single-regular-string-literal-character
simple-escape-sequence
hexadecimal-escape-sequence
unicode-escape-sequence
regular-string-literal-character
regular-string-literal-characters regular-string-literal-character
shift-expression
relational-expression < shift-expression
relational-expression > shift-expression
relational-expression <= shift-expression
relational-expression >= shift-expression
relational-expression is type
relational-expression as type
attributes opt remove block
local-variable-declaration
expression
return expression opt ;
type
void
>|>
>|>=
interface-type
type-parameter
secondary-constraints , interface-type
secondary-constraints , type-parameter
select expression
if-statement
switch-statement
select-clause
group-clause
attributes opt accessor-modifier opt set accessor-body
additive-expression
shift-expression << additive-expression
shift-expression right-shift additive-expression
one of
+ -
one of
\' \" \\ \0 \a \b \f \n \r \t \v
identifier type-argument-list opt
numeric-type
bool
Any character except ' (U+0027), \ (U+005C), and new-line-character
// input-characters opt
Any character except " (U+0022), \ (U+005C), and new-line-character
any character except "
whitespace opt not-number-sign input-characters opt
skipped-section-part
skipped-section skipped-section-part
skipped-characters opt new-line
pp-directive
catch ( class-type identifier opt ) block
specific-catch-clause
specific-catch-clauses specific-catch-clause
labeled-statement
declaration-statement
embedded-statement
invocation-expression
object-creation-expression
assignment
post-increment-expression
post-decrement-expression
pre-increment-expression
pre-decrement-expression
statement-expression
statement-expression-list , statement-expression
statement
statement-list statement
block
;
attributes opt static-constructor-modifiers identifier ( ) static-constructor-body
externopt static
static externopt
regular-string-literal
verbatim-string-literal
{ struct-member-declarations opt }
attributes opt struct-modifiers opt partialopt struct identifier type-parameter-list opt struct-interfaces opt type-parameter-constraints-clauses opt struct-body ;opt
: interface-type-list
constant-declaration
field-declaration
method-declaration
property-declaration
event-declaration
indexer-declaration
operator-declaration
constructor-declaration
static-constructor-declaration
type-declaration
struct-member-declaration
struct-member-declarations struct-member-declaration
new
public
protected
internal
private
struct-modifier
struct-modifiers struct-modifier
type-name
simple-type
nullable-type
{ switch-sections opt }
case constant-expression :
default :
switch-label
switch-labels switch-label
switch-labels statement-list
switch-section
switch-sections switch-section
switch ( expression ) switch-block
this
throw expression opt ;
identifier
keyword
integer-literal
real-literal
character-literal
string-literal
operator-or-punctuator
try block catch-clauses
try block finally-clause
try block catch-clauses finally-clause
value-type
reference-type
type-parameter
type
< type-arguments >
type-argument
type-arguments , type-argument
class-declaration
struct-declaration
interface-declaration
enum-declaration
delegate-declaration
namespace-or-type-name
type of ( type )
type of ( unbound-type-name )
type of ( void )
identifier
identifier
primary-constraint
secondary-constraints
constructor-constraint
primary-constraint , secondary-constraints
primary-constraint , constructor-constraint
secondary-constraints , constructor-constraint
primary-constraint , secondary-constraints , constructor-constraint
where type-parameter : type-parameter-constraints
type-parameter-constraints-clause
type-parameter-constraints-clauses type-parameter-constraints-clause
< type-parameters >
attributes opt type-parameter
type-parameters , attributes opt type-parameter
primary-expression
+ unary-expression
- unary-expression
! unary-expression
~ unary-expression
pre-increment-expression
pre-decrement-expression
cast-expression
type operator overloadable-unary-operator ( type identifier )
identifier generic-dimension-specifier opt
identifier :: identifier generic-dimension-specifier opt
unbound-type-name . identifier generic-dimension-specifier opt
unchecked ( expression )
unchecked block
\u hex-digit hex-digit hex-digit hex-digit
\U hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit
using identifier = namespace-or-type-name ;
using-alias-directive
using-namespace-directive
using-directive
using-directives using-directive
using namespace-name ;
using ( resource-acquisition ) embedded-statement
struct-type
enum-type
identifier
identifier = variable-initializer
variable-declarator
variable-declarators , variable-declarator
expression
array-initializer
expression
array-initializer
variable-initializer
variable-initializer-list , variable-initializer
expression
@" verbatim - string-literal - character sopt "
single-verbatim-string-literal-character
quote-escape-sequence
verbatim-string-literal-character
verbatim-string-literal-characters verbatim-string-literal-character
disable
restore
decimal-digits
warning-list whitespace opt , whitespace opt decimal-digits
where boolean-expression
while ( boolean-expression ) embedded-statement
Any character with Unicode class Zs
Horizontal tab character (U+0009)
Vertical tab character (U+000B)
Form feed character (U+000C)
yield return expression ;
yield break ;
引用关系信息