`
talin2010
  • 浏览: 502381 次
  • 性别: Icon_minigender_1
  • 来自: 河北
社区版块
存档分类
最新评论
文章列表
A compilation-unit defines the overall structure of a source file. A compilation unit consists of zero or moreusing-directives followed by zero or more global-attributes followed by zero or more namespace-memberdeclarations.compilation-unit:using-directivesopt global-attributesopt namespace-member-de ...
A namespace-declaration consists of the keyword namespace, followed by a namespace name and body,optionally followed by a semicolon.namespace-declaration:namespace qualified-identifier namespace-body ;optqualified-identifier:identifierqualified-identifier . identifiernamespace-body:{ using-directives ...
system for a program, and as an .external. organization system.a way of presenting program elements thatare exposed to other programs.Using-directives (§16.3) are provided to facilitate the use of namespaces.
The using statement obtains one or more resources, executes a statement, and then disposes of the resource.using-statement:using ( resource-acquisition ) embedded-statementresource-acquisition:local-variable-declarationexpressionA resource is a class or struct that implements System.IDisposable, whic ...
lock ( expression ) embedded-statementThe expression of a lock statement must denote a value of a reference-type. No implicit boxing conversion(§13.1.5) is ever performed for the expression of a lock statement, and thus it is a compile-time error for theexpression to denote a value of a value-type.A ...
The checked and unchecked statements are used to control the overflow checking context for integraltypearithmetic operations and conversions.checked-statement:checked blockunchecked-statement:unchecked blockThe checked statement causes all expressions in the block to be evaluated in a checked context ...
The try statement provides a mechanism for catching exceptions that occur during execution of a block.Furthermore, the try statement provides the ability to specify a block of code that is always executed whencontrol leaves the try statement.try-statement:try block catch-clausestry block finally-clau ...
Jump statements unconditionally transfer control.jump-statement:break-statementcontinue-statementgoto-statementreturn-statementthrow-statementThe location to which a jump statement transfers control is called the target of the jump statement.When a jump statement occurs within a block, and the target ...
Iteration statements repeatedly execute an embedded statement.iteration-statement:while-statementdo-statementfor-statementforeach-statement15.8.1 The while statementThe while statement conditionally executes an embedded statement zero or more times.Chapter 15 Statements187while-statement:while ( bool ...
Selection statements select one of a number of possible statements for execution based on the value of someexpression.selection-statement:if-statementswitch-statement15.7.1 The if statementThe if statement selects a statement for execution based on the value of a boolean expression.if-statement:if ( ...
An expression-statement evaluates a given expression. The value computed by the expression, if any, isdiscarded.expression-statement:statement-expression ;statement-expression:invocation-expressionobject-creation-expressionassignmentpost-increment-expressionpost-decrement-expressionpre-increment-expr ...
blocks, but are not permitted as embedded statements.labeled-statement:identifier : statementA labeled statement declares a label with the name given by the identifier. The scope of a label is the wholeblock in which the label is declared, including any nested blocks. It is a compile-time error for t ...
An empty-statement does nothing.empty-statement:;An empty statement is used when there are no operations to perform in a context where a statement isrequired.Execution of an empty statement simply transfers control to the end point of the statement. Thus, the endpoint of an empty statement is reachab ...
Every statement has an end point. In intuitive terms, the end point of a statement is the location thatimmediately follows the statement. The execution rules for composite statements (statements that containembedded statements) specify the action that is taken when control reaches the end point of an ...
A block permits multiple statements to be written in contexts where a single statement is allowed.block:{ statement-listopt }A block consists of an optional statement-list (§15.2.1), enclosed in braces. If the statement list is omitted,the block is said to be empty.A block may contain declaration sta ...
Global site tag (gtag.js) - Google Analytics