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
Copy file name to clipboardexpand all lines: standard/arrays.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -102,7 +102,7 @@ When an array type `S[]` implements `IList<T>`, some of the members of the imple
102
102
103
103
## 17.3 Array creation
104
104
105
-
Array instances are created by *array_creation_expression*s ([§12.8.17.3](expressions.md#128173-array-creation-expressions)) or by field or local variable declarations that include an *array_initializer* ([§17.7](arrays.md#177-array-initializers)). Array instances can also be created implicitly as part of evaluating an argument list involving a parameter array ([§15.6.2.4](classes.md#15624-parameter-arrays)).
105
+
Array instances are created by *array_creation_expression*s ([§12.8.17.4](expressions.md#128174-array-creation-expressions)) or by field or local variable declarations that include an *array_initializer* ([§17.7](arrays.md#177-array-initializers)). Array instances can also be created implicitly as part of evaluating an argument list involving a parameter array ([§15.6.2.4](classes.md#15624-parameter-arrays)).
106
106
107
107
When an array instance is created, the rank and length of each dimension are established and then remain constant for the entire lifetime of the instance. In other words, it is not possible to change the rank of an existing array instance, nor is it possible to resize its dimensions.
108
108
@@ -158,7 +158,7 @@ Array covariance specifically does not extend to arrays of *value_type*s. For ex
Copy file name to clipboardexpand all lines: standard/conversions.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -849,7 +849,7 @@ Anonymous functions may influence overload resolution, and participate in type i
849
849
850
850
### 10.7.2 Evaluation of anonymous function conversions to delegate types
851
851
852
-
Conversionofananonymousfunctiontoadelegate type produces a delegate instance that references the anonymous function and the (possiblyempty) set of captured outer variables that are active at the time of the evaluation. When the delegate is invoked, thebodyoftheanonymousfunctionisexecuted. Thecodeinthebodyisexecutedusingthesetofcapturedoutervariablesreferencedbythedelegate. A *delegate_creation_expression* ([§12.8.17.4](expressions.md#128174-delegate-creation-expressions)) canbeusedasanalternatesyntaxforconvertingananonymousmethodtoadelegate type.
852
+
Conversionofananonymousfunctiontoadelegate type produces a delegate instance that references the anonymous function and the (possiblyempty) set of captured outer variables that are active at the time of the evaluation. When the delegate is invoked, thebodyoftheanonymousfunctionisexecuted. Thecodeinthebodyisexecutedusingthesetofcapturedoutervariablesreferencedbythedelegate. A *delegate_creation_expression* ([§12.8.17.5](expressions.md#128175-delegate-creation-expressions)) canbeusedasanalternatesyntaxforconvertingananonymousmethodtoadelegate type.
853
853
854
854
The invocation list of a delegate produced from an anonymous function contains a single entry. The exact target object and target method of the delegate are unspecified. In particular, itisunspecifiedwhetherthetargetobjectofthedelegateis `null`, the `this` valueoftheenclosingfunctionmember, orsomeotherobject.
Copy file name to clipboardexpand all lines: standard/delegates.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -178,11 +178,11 @@ This definition of compatibility allows covariance in return type and contravari
178
178
179
179
## 20.5 Delegate instantiation
180
180
181
-
Aninstanceofadelegate is created by a *delegate_creation_expression* ([§12.8.17.4](expressions.md#128174-delegate-creation-expressions)), aconversiontoadelegate type, delegate combination or delegate removal. The newly created delegate instance then refers to one or more of:
181
+
Aninstanceofadelegate is created by a *delegate_creation_expression* ([§12.8.17.5](expressions.md#128175-delegate-creation-expressions)), aconversiontoadelegate type, delegate combination or delegate removal. The newly created delegate instance then refers to one or more of:
182
182
183
183
- The static method referenced in the *delegate_creation_expression*, or
184
184
-Thetargetobject (whichcannotbe `null`) andinstancemethodreferencedinthe*delegate_creation_expression*, or
@@ -212,7 +212,7 @@ An instance of a delegate is created by a *delegate_creation_expression* ([§12.
212
212
213
213
Thesetofmethodsencapsulatedbyadelegate instance is called an *invocation list*. When a delegate instance is created from a single method, itencapsulatesthatmethod, anditsinvocationlistcontainsonlyoneentry. However, whentwonon-`null` delegate instances are combined, theirinvocationlistsareconcatenated—intheorderleftoperandthenrightoperand—toformanewinvocationlist, whichcontainstwoormoreentries.
214
214
215
-
Whenanewdelegate is created from a single delegate the resultant invocation list has just one entry, whichisthesourcedelegate ([§12.8.17.4](expressions.md#128174-delegate-creation-expressions)).
215
+
Whenanewdelegate is created from a single delegate the resultant invocation list has just one entry, whichisthesourcedelegate ([§12.8.17.5](expressions.md#128175-delegate-creation-expressions)).
216
216
217
217
Delegatesarecombinedusingthebinary `+` ([§12.10.5](expressions.md#12105-addition-operator)) and `+=` operators ([§12.21.4](expressions.md#12214-compound-assignment)). Adelegatecanberemovedfromacombinationofdelegates, usingthebinary `-` ([§12.10.6](expressions.md#12106-subtraction-operator)) and `-=` operators ([§12.21.4](expressions.md#12214-compound-assignment)). Delegatescanbecomparedforequality ([§12.12.9](expressions.md#12129-delegate-equality-operators)).
Copy file name to clipboardexpand all lines: standard/expressions.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ For expressions which occur as subexpressions of larger expressions, with the no
23
23
24
24
- A namespace. An expression with this classification can only appear as the left-hand side of a *member_access* ([§12.8.7](expressions.md#1287-member-access)). In any other context, an expression classified as a namespace causes a compile-time error.
25
25
- A type. An expression with this classification can only appear as the left-hand side of a *member_access* ([§12.8.7](expressions.md#1287-member-access)). In any other context, an expression classified as a type causes a compile-time error.
26
-
- A method group, which is a set of overloaded methods resulting from a member lookup ([§12.5](expressions.md#125-member-lookup)). A method group may have an associated instance expression and an associated type argument list. When an instance method is invoked, the result of evaluating the instance expression becomes the instance represented by `this` ([§12.8.14](expressions.md#12814-this-access)). A method group is permitted in an *invocation_expression* ([§12.8.10](expressions.md#12810-invocation-expressions)) or a *delegate_creation_expression* ([§12.8.17.4](expressions.md#128174-delegate-creation-expressions)), and can be implicitly converted to a compatible delegate type ([§10.8](conversions.md#108-method-group-conversions)). In any other context, an expression classified as a method group causes a compile-time error.
26
+
- A method group, which is a set of overloaded methods resulting from a member lookup ([§12.5](expressions.md#125-member-lookup)). A method group may have an associated instance expression and an associated type argument list. When an instance method is invoked, the result of evaluating the instance expression becomes the instance represented by `this` ([§12.8.14](expressions.md#12814-this-access)). A method group is permitted in an *invocation_expression* ([§12.8.10](expressions.md#12810-invocation-expressions)) or a *delegate_creation_expression* ([§12.8.17.5](expressions.md#128175-delegate-creation-expressions)), and can be implicitly converted to a compatible delegate type ([§10.8](conversions.md#108-method-group-conversions)). In any other context, an expression classified as a method group causes a compile-time error.
27
27
- An event access. Every event access has an associated type, namely the type of the event. Furthermore, an event access may have an associated instance expression. An event access may appear as the left operand of the `+=` and `-=` operators ([§12.21.5](expressions.md#12215-event-assignment)). In any other context, an expression classified as an event access causes a compile-time error. When an accessor of an instance event access is invoked, the result of evaluating the instance expression becomes the instance represented by `this` ([§12.8.14](expressions.md#12814-this-access)).
28
28
- A throw expression, which may be used in several contexts to throw an exception in an expression. A throw expression may be converted by an implicit conversion to any type.
29
29
@@ -685,7 +685,7 @@ The expressions of an argument list are always evaluated in textual order.
685
685
>
686
686
>*endexample*
687
687
688
-
Whenafunctionmemberwithaparameterarrayisinvokedinitsexpandedformwithatleastoneexpandedargument, theinvocationisprocessedasifanarraycreationexpressionwithanarrayinitializer ([§12.8.17.3](expressions.md#128173-array-creation-expressions)) wasinsertedaroundtheexpandedarguments. Anemptyarrayispassed when there are no arguments for the parameter array; it is unspecified whether the reference passed is to a newly allocated or existing empty array.
688
+
Whenafunctionmemberwithaparameterarrayisinvokedinitsexpandedformwithatleastoneexpandedargument, theinvocationisprocessedasifanarraycreationexpressionwithanarrayinitializer ([§12.8.17.4](expressions.md#128174-array-creation-expressions)) wasinsertedaroundtheexpandedarguments. Anemptyarrayispassed when there are no arguments for the parameter array; it is unspecified whether the reference passed is to a newly allocated or existing empty array.
689
689
690
690
>*Example*:Giventhedeclaration
691
691
>
@@ -1822,7 +1822,7 @@ A *null_conditional_member_access* expression `E` is of the form `P?.A`. The me
1822
1822
>
1823
1823
> *endnote*
1824
1824
1825
-
A *null_conditional_projection_initializer* isarestrictionof *null_conditional_member_access* andhasthesamesemantics. Itonlyoccursasaprojectioninitializerinananonymousobjectcreationexpression ([§12.8.17.2.4](expressions.md#1281724-anonymous-object-creation-expressions)).
1825
+
A *null_conditional_projection_initializer* isarestrictionof *null_conditional_member_access* andhasthesamesemantics. Itonlyoccursasaprojectioninitializerinananonymousobjectcreationexpression ([§12.8.17.3](expressions.md#128173-anonymous-object-creation-expressions)).
1826
1826
1827
1827
### 12.8.9 Null-forgiving expressions
1828
1828
@@ -2424,7 +2424,7 @@ The `new` operator implies creation of an instance of a type, but does not neces
2424
2424
2425
2425
#### 12.8.17.2 Object creation expressions
2426
2426
2427
-
##### §NewGeneral General
2427
+
##### 12.8.17.2.1 General
2428
2428
2429
2429
An *object_creation_expression* is used to create a new instance of a *class_type* or a *value_type*.
2430
2430
@@ -2714,7 +2714,7 @@ The collection object to which a collection initializer is applied shall be of a
@@ -2910,7 +2910,7 @@ An array creation expression permits instantiation of an array with elements of
2910
2910
>
2911
2911
> *end example*
2912
2912
2913
-
Implicitly typed array creation expressions can be combined with anonymous object initializers ([§12.8.17.2.4](expressions.md#1281724-anonymous-object-creation-expressions)) tocreateanonymouslytypeddatastructures.
2913
+
Implicitly typed array creation expressions can be combined with anonymous object initializers ([§12.8.17.3](expressions.md#128173-anonymous-object-creation-expressions)) tocreateanonymouslytypeddatastructures.
2914
2914
2915
2915
>*Example*:
2916
2916
>
@@ -2933,7 +2933,7 @@ Implicitly typed array creation expressions can be combined with anonymous objec
The argument of a delegate creation expression shall be a method group, an anonymous function, or a value of either the compile-time type `dynamic` or a *delegate_type*. If the argument is a method group, it identifies the method and, for an instance method, the object for which to create a delegate. If the argument is an anonymous function it directly defines the parameters and method body of the delegate target. If the argument is a value it identifies a delegate instance of which to create a copy.
2947
2947
2948
-
If the *expression* has the compile-time type `dynamic`, the *delegate_creation_expression* is dynamically bound ([§12.8.17.4](expressions.md#128174-delegate-creation-expressions)), and the rules below are applied at run-time using the run-time type of the *expression*. Otherwise, the rules are applied at compile-time.
2948
+
If the *expression* has the compile-time type `dynamic`, the *delegate_creation_expression* is dynamically bound ([§12.8.17.5](expressions.md#128175-delegate-creation-expressions)), and the rules below are applied at run-time using the run-time type of the *expression*. Otherwise, the rules are applied at compile-time.
2949
2949
2950
2950
The binding-time processing of a *delegate_creation_expression* of the form new `D(E)`, where `D` is a *delegate_type* and `E` is an *expression*, consists of the following steps:
2951
2951
@@ -6808,7 +6808,7 @@ Constant expressions are required in the contexts listed below and this is indic
0 commit comments