diff --git a/standard/variables.md b/standard/variables.md index 621812b14..d9df523dd 100644 --- a/standard/variables.md +++ b/standard/variables.md @@ -16,7 +16,7 @@ C# defines seven categories of variables: static variables, instance variables, > *Example*: In the following code > -> +> > ```csharp > class A > { @@ -137,7 +137,7 @@ A local variable introduced by a *local_variable_declaration* is not automatical > *Note*: A *local_variable_declaration* that includes a *local_variable_initializer* is still initially unassigned. Execution of the declaration behaves exactly like an assignment to the variable ([§9.4.4.5](variables.md#9445-declaration-statements)). It is possible to use a variable without executing its *local_variable_initializer*; e.g., within the initializer expression itself or by using a *goto_statement* to bypass the initialization: > -> +> > ```csharp > goto L; > @@ -435,7 +435,7 @@ finally «finally_block» > *Example*: The following example demonstrates how the different blocks of a `try` statement ([§12.11](statements.md#1211-the-try-statement)) affect definite assignment. > -> +> > ```csharp > class A > { @@ -527,7 +527,7 @@ For a constant expression with value `true`: > *Example*: > -> +> > ```csharp > int x; > if (true) {} @@ -546,7 +546,7 @@ For a constant expression with value `false`: > *Example*: > -> +> > ```csharp > int x; > if (false) @@ -617,7 +617,7 @@ For an expression *expr* of the form: > *Example*: In the following code > -> +> > ```csharp > class A > { @@ -652,7 +652,7 @@ For an expression *expr* of the form: > *Example*: In the following code > -> +> > ```csharp > class A > { @@ -695,7 +695,7 @@ For an expression *expr* of the form: > *Example*: In the following code > -> +> > ```csharp > class A > { @@ -775,8 +775,8 @@ For a *lambda_expression* or *anonymous_method_expression* *expr* with a body (e > *Example*: The example > +> > ```csharp -> > class A > { > delegate bool Filter(int i); @@ -800,7 +800,7 @@ For a *lambda_expression* or *anonymous_method_expression* *expr* with a body (e > *Example*: The example > -> +> > ```csharp > class A > { @@ -843,6 +843,7 @@ Delegate conversions have a control flow path to the local function body. Captur > *Example*: The following example demonstrates definite assignment for captured variables in local functions. If a local function reads a captured variable before writing it, the captured variable must be definitely assigned before calling the local function. The local function `F1` reads `s` without assigning it. It is an error if `F1` is called before `s` is definitely assigned. `F2` assigns `i` before reading it. It may be called before `i` is definitely assigned. Furthermore, `F3` may be called after `F2` because `s2` is definitely assigned in `F2`. > +> > ```csharp > void M() > {