Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Avoid allocating in TimeZoneInfo.GetHashCode() #8513

Merged
merged 1 commit into from
Dec 8, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mscorlib/src/System/TimeZoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ static public TimeZoneInfo FromSerializedString(string source) {
// GetHashCode -
//
public override int GetHashCode() {
return m_id.ToUpper(CultureInfo.InvariantCulture).GetHashCode();
return StringComparer.OrdinalIgnoreCase.GetHashCode(m_id);
}

//
Expand Down