Skip to content

Should not return default unconditionally #50825

@frankmeten

Description

@frankmeten

Type of issue

Other (describe below)

Description

"yield return default;" should not return default uncondionally. it shoud be in a else block.

Page URL

https://learn.microsoft.com/zh-cn/dotnet/csharp/tour-of-csharp/tutorials/pattern-matching

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/tour-of-csharp/tutorials/pattern-matching.md

Document Version Independent Id

d68419a1-0819-2456-ef95-bfa0a05ec55a

Platform Id

dafef79e-b177-be72-40ff-77db2c38557f

Article author

@BillWagner

Metadata

  • ID: cc9b5079-735d-15fc-f5f5-eca009731538
  • PlatformId: dafef79e-b177-be72-40ff-77db2c38557f
  • Service: dotnet-csharp
  • Sub-service: get-started

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions