Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
VTimeZoneInfo: Remove Equals and GetHashCode overrides
  • Loading branch information
axunonb committed May 31, 2025
commit b3374761ea8001d53204409d2b31124d3ba9ea02
24 changes: 0 additions & 24 deletions Ical.Net/VTimeZoneInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,6 @@ protected override void OnDeserializing(StreamingContext context)
Initialize();
}

public override bool Equals(object? obj)
{
var tzi = obj as VTimeZoneInfo;
if (tzi != null)
{
return Equals(TimeZoneName, tzi.TimeZoneName) &&
Equals(OffsetFrom, tzi.OffsetFrom) &&
Equals(OffsetTo, tzi.OffsetTo);
}
return base.Equals(obj);
}

public override int GetHashCode()
{
unchecked
{
var hashCode = TimeZoneName?.GetHashCode() ?? 0;
hashCode = (hashCode * 397) ^ (OffsetFrom?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ (OffsetTo?.GetHashCode() ?? 0);

return hashCode;
}
}

public virtual string? TzId
{
get =>
Expand Down
Loading