Skip to content

Equatable example may have an error #10234

@KenKor

Description

@KenKor

Type of issue

Typo

Description

I guess the string comparison should be done differently. Instead:
return this.Name == other.Name && this.Code == other.Code;
I would write:
return this.Name.equals(other.Name) && this.Code == other.Code;

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.union?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Linq/Enumerable.xml

Document Version Independent Id

17beb25a-a13f-e33b-c350-9378ffdc8edb

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Linq

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions