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/expressions.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ For expressions which occur as subexpressions of larger expressions, with the no
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
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.6](expressions.md#128176-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
-
- A throw expression, which may be used is several contexts to throw an exception in an expression. A throw expression may be converted by an implicit conversion to any type.
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
30
30
A property access or indexer access is always reclassified as a value by performing an invocation of the get accessor or the set accessor. The particular accessor is determined by the context of the property or indexer access: If the access is the target of an assignment, the set accessor is invoked to assign a new value ([§12.21.2](expressions.md#12212-simple-assignment)). Otherwise, the get accessor is invoked to obtain the current value ([§12.2.2](expressions.md#1222-values-of-expressions)).
31
31
@@ -93,7 +93,7 @@ Static binding takes place at compile-time, whereas dynamic binding takes place
93
93
94
94
**This subclause is informative.**
95
95
96
-
Dynamic binding allows C# programs to interact with dynamic objects, i.e., objects that do not follow the normal rules of the C# type system. Dynamic objects may be objects from other programming languages with different types systems, or they may be objects that are programmatically setup to implement their own binding semantics for different operations.
96
+
Dynamic binding allows C# programs to interact with dynamic objects, i.e., objects that do not follow the normal rules of the C# type system. Dynamic objects may be objects from other programming languages with different types systems, or they may be objects that are programmatically set up to implement their own binding semantics for different operations.
97
97
98
98
The mechanism by which a dynamic object implements its own semantics is implementation-defined. A given interface – again implementation-defined – is implemented by dynamic objects to signal to the C# run-time that they have special semantics. Thus, whenever operations on a dynamic object are dynamically bound, their own binding semantics, rather than those of C# as specified in this specification, take over.
99
99
@@ -951,7 +951,7 @@ The ***inferred return type*** is determined as follows:
951
951
> }
952
952
> ```
953
953
>
954
-
>typeinferencefor the invocation proceeds as follows: First, the argument “1:15:30” is related to the value parameter, inferring `X` to be string. Then, the parameter of the first anonymous function, `s`, is given the inferred type `string`, and the expression `TimeSpan.Parse(s)` isrelatedtothereturntypeof `f1`, inferring `Y` tobe `System.TimeSpan`. Finally, theparameterofthesecondanonymousfunction, `t`, isgiventheinferredtype `System.TimeSpan`, andtheexpression `t.TotalHours` isrelatedtothereturntypeof `f2`, inferring `Z` tobe `double`. Thus, theresultoftheinvocationisoftype `double`.
954
+
>typeinferencefor the invocation proceeds as follows: First, the argument “1:15:30” is related to the value parameter, inferring `X` to be `string`. Then, the parameter of the first anonymous function, `s`, is given the inferred type `string`, and the expression `TimeSpan.Parse(s)` isrelatedtothereturntypeof `f1`, inferring `Y` tobe `System.TimeSpan`. Finally, theparameterofthesecondanonymousfunction, `t`, isgiventheinferredtype `System.TimeSpan`, andtheexpression `t.TotalHours` isrelatedtothereturntypeof `f2`, inferring `Z` tobe `double`. Thus, theresultoftheinvocationisoftype `double`.
955
955
>
956
956
> *endexample*
957
957
@@ -1022,7 +1022,7 @@ For a function member that includes a parameter array, if the function member is
1022
1022
- theparameter-passingmodeoftheargumentisidenticaltotheparameter-passingmodeofthecorrespondingparameter, and
1023
1023
- forafixedvalueparameteroravalueparametercreatedbytheexpansion, animplicitconversion ([§10.2](conversions.md#102-implicit-conversions)) existsfromtheargumentexpressiontothetypeofthecorrespondingparameter, or
0 commit comments