You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The actions of a program are expressed using ***statements***. C# supports several different kinds of statements, a number of which are defined in terms of embedded statements.
17
+
The actions of a program are expressed using *statements*. C# supports several different kinds of statements, a number of which are defined in terms of embedded statements.
18
18
19
-
A ***block*** permits multiple statements to be written in contexts where a single statement is allowed. A block consists of a list of statements written between the delimiters `{` and `}`.
19
+
A *block* permits multiple statements to be written in contexts where a single statement is allowed. A block consists of a list of statements written between the delimiters `{` and `}`.
20
20
21
-
***Declaration statements*** are used to declare local variables and constants.
21
+
*Declaration statements* are used to declare local variables and constants.
22
22
23
-
***Expression statements*** are used to evaluate expressions. Expressions that can be used as statements include method invocations, object allocations using the `new` operator, assignments using `=` and the compound assignment operators, increment and decrement operations using the `++` and `--` operators and `await` expressions.
23
+
*Expression statements* are used to evaluate expressions. Expressions that can be used as statements include method invocations, object allocations using the `new` operator, assignments using `=` and the compound assignment operators, increment and decrement operations using the `++` and `--` operators and `await` expressions.
24
24
25
-
***Selection statements*** are used to select one of a number of possible statements for execution based on the value of some expression. In this group are the `if` and `switch` statements.
25
+
*Selection statements* are used to select one of a number of possible statements for execution based on the value of some expression. In this group are the `if` and `switch` statements.
26
26
27
-
***Iteration statements*** are used to execute repeatedly an embedded statement. In this group are the `while`, `do`, `for`, and `foreach` statements.
27
+
*Iteration statements* are used to execute repeatedly an embedded statement. In this group are the `while`, `do`, `for`, and `foreach` statements.
28
28
29
-
***Jump statements*** are used to transfer control. In this group are the `break`, `continue`, `goto`, `throw`, `return`, and `yield` statements.
29
+
*Jump statements* are used to transfer control. In this group are the `break`, `continue`, `goto`, `throw`, `return`, and `yield` statements.
30
30
31
31
The `try`...`catch` statement is used to catch exceptions that occur during execution of a block, and the `try`...`finally` statement is used to specify finalization code that is always executed, whether an exception occurred or not.
32
32
@@ -38,79 +38,79 @@ The `using` statement is used to obtain a resource, execute a statement, and the
38
38
39
39
The following lists the kinds of statements that can be used, and provides an example for each.
0 commit comments