Open
Description
Type of issue
Missing information
Description
The description of the error is somewhat misleading. An enumerator method can't mix yield return
and return
statements. A single return
for an object that implements the interface is allowed.
This article should also discuss how IAsyncEnumerable<T>
works for these methods as well.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs1622
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/misc/cs1622.md
Document Version Independent Id
393a44fe-2f58-bc19-33c2-5da5504988c0
Article author
Metadata
- ID: e140b315-cdd1-3755-97cc-a6b9aa65db21
- Service: dotnet-csharp
- Sub-service: errors-warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment