Skip to content

Commit f0948e2

Browse files
Francois Jolymairaw
Francois Joly
authored andcommitted
Update ref-returns.md (dotnet#2914)
* Update ref-returns.md It seems like there's a missing 'not' when explaining why ref return values cannot be part of `async` methods. I might be wrong but it would make sense that since their values are not know, they cannot be in `async` methods. * Update ref-returns.md Rewrote the sentence to avoid any confusion concerning `async` methods.
1 parent 81a2252 commit f0948e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: docs/csharp/programming-guide/classes-and-structs/ref-returns.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ There are some restrictions on the value that a method can return as a reference
3838

3939
- The return value cannot be a constant, an enumeration member, or a property of a `class` or `struct`. Attempting to return these generates compiler error CS8156, "An expression cannot be used in this context because it may not be returned by reference."
4040

41-
In addition, because an asynchronous method may return before it has finished execution and its return value is known, reference return values are not allowed on `async` methods.
41+
In addition, because an asynchronous method may return before it has finished execution, while its return value is still unknown, reference return values are not allowed on async methods.
4242

4343
## Defining a ref return value
4444

0 commit comments

Comments
 (0)