Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorPilley committed Nov 3, 2024
1 parent 5db0c0f commit 3e4956d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/PhoneNumbers/GeographicPhoneNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public bool Equals(GeographicPhoneNumber? other)

// The National Significant Number (NSN) must be unique within a numbering plan so only
// where the countries match and the NSNs match they are the the same phone number.
return Country == other.Country &&
return Country.Equals(other.Country) &&
NationalSignificantNumber.Equals(other.NationalSignificantNumber, StringComparison.Ordinal);
}

Expand Down
2 changes: 1 addition & 1 deletion src/PhoneNumbers/MobilePhoneNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public bool Equals(MobilePhoneNumber? other)

// The National Significant Number (NSN) must be unique within a numbering plan so only
// where the countries match and the NSNs match they are the the same phone number.
return Country == other.Country &&
return Country.Equals(other.Country) &&
NationalSignificantNumber.Equals(other.NationalSignificantNumber, StringComparison.Ordinal);
}

Expand Down
2 changes: 1 addition & 1 deletion src/PhoneNumbers/NonGeographicPhoneNumber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public bool Equals(NonGeographicPhoneNumber? other)

// The National Significant Number (NSN) must be unique within a numbering plan so only
// where the countries match and the NSNs match they are the the same phone number.
return Country == other.Country &&
return Country.Equals(other.Country) &&
NationalSignificantNumber.Equals(other.NationalSignificantNumber, StringComparison.Ordinal);
}

Expand Down

0 comments on commit 3e4956d

Please sign in to comment.