Skip to content

Commit 035fb44

Browse files
Update lambda-operator.md (#26893)
* Update lambda-operator.md * Update docs/csharp/language-reference/operators/lambda-operator.md Co-authored-by: Bill Wagner <[email protected]>
1 parent b9b08b5 commit 035fb44

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/csharp/language-reference/operators/lambda-operator.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,14 @@ An expression body definition has the following general syntax:
3939
member => expression;
4040
```
4141

42-
where `expression` is a valid expression. The return type of `expression` must be implicitly convertible to the member's return type. If the member's return type is `void` or if the member is a constructor, a finalizer, or a property or indexer `set` accessor, `expression` must be a [*statement expression*](~/_csharplang/spec/statements.md#expression-statements). Because the expression's result is discarded, the return type of that expression can be any type.
42+
where `expression` is a valid expression. The return type of `expression` must be implicitly convertible to the member's return type. If the member:
43+
44+
* Has a `void` return type:
45+
* Is a:
46+
* Constructor
47+
* Finalizer
48+
* Property or indexer `set` accessor
49+
`expression` must be a [*statement expression*](~/_csharplang/spec/statements.md#expression-statements). Because the expression's result is discarded, the return type of that expression can be any type.
4350

4451
The following example shows an expression body definition for a `Person.ToString` method:
4552

0 commit comments

Comments
 (0)