| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- namespace BO.AppServer.Data
- {
- public class KeyScalarDate : IEquatable<KeyScalarDate>
- {
- public int Day { get; set; }
- public int Month { get; set; }
- public int Year { get; set; }
- public bool Equals(KeyScalarDate other)
- {
- if (other == null)
- return false;
- return Day == other.Day && Year == other.Year && Month == other.Month;
- }
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != this.GetType()) return false;
- return Equals((KeyScalarDate)obj);
- }
- public override int GetHashCode()
- {
- return (Day * Month * Year).GetHashCode();
- }
- public static bool operator ==(KeyScalarDate left, KeyScalarDate right)
- {
- return Equals(left, right);
- }
- public static bool operator !=(KeyScalarDate left, KeyScalarDate right)
- {
- return !Equals(left, right);
- }
- }
- }
|