コード例 #1
0
        public int CompareTo(object obj)
        {
            SpanOfMonths other = obj as SpanOfMonths;

            if (this.PeriodFrom.Equals(other.PeriodFrom))
            {
                return(this.PeriodUpto.CompareTo(other.PeriodUpto));
            }
            return(this.PeriodFrom.CompareTo(other.PeriodFrom));
        }
コード例 #2
0
        public override bool Equals(object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            if (obj == null || this.GetType() != obj.GetType())
            {
                return(false);
            }

            SpanOfMonths other = obj as SpanOfMonths;

            return(this.isEqualToInterval(other));
        }
コード例 #3
0
 public bool isEqualToInterval(SpanOfMonths other)
 {
     return(this.PeriodFrom.Equals(other.PeriodFrom) && this.PeriodUpto.Equals(other.PeriodUpto));
 }