Exemple #1
0
 /// <summary>Indicates whether the current object is equal to another object of the same type.
 /// </summary>
 /// <param name="other">An object to compare with this object.</param>
 /// <returns><c>true</c> if the current object is equal to the <paramref name="other"/> parameter; otherwise, <c>false</c>.</returns>
 /// <remarks>The info string will not be taken into account.</remarks>
 public bool Equals(DateInfo other)
 {
     return((other.DateTime.Day == this.DateTime.Day) && (other.DateTime.Month == this.DateTime.Month) && (other.DateTime.Year == this.DateTime.Year));
 }
Exemple #2
0
 /// <summary>Compares this instance to a specified object of the same type and returns an indication of their relative values.
 /// </summary>
 /// <param name="other">An object to compare with this object.</param>
 /// <returns>A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings:
 /// <value>Less than zero: This object is less than the <paramref name="other"/> parameter.
 /// Zero: This object is equal to <paramref name="other"/>.
 /// Greater than zero: This object is greater than <paramref name="other"/>.
 /// </value></returns>
 /// <remarks>The info string will not be taken into account.</remarks>
 public int CompareTo(DateInfo other)
 {
     return(this.DateTime.CompareTo(other.DateTime));
 }