public string this[string columnName] { get { switch (columnName) { case nameof(Period1): case nameof(Period2): if (Period1.Equals(Period2)) { return("Period should be defferent"); } break; default: break; } return(string.Empty); } }
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="Period1">A time period.</param> /// <param name="Period2">Another time period.</param> /// <returns>true|false</returns> public static Boolean operator >(Period Period1, Period Period2) => Period1.CompareTo(Period2) > 0;
/// <summary> /// Compares two instances of this object. /// </summary> /// <param name="Period1">A time period.</param> /// <param name="Period2">Another time period.</param> /// <returns>true|false</returns> public static Boolean operator ==(Period Period1, Period Period2) => Period1.Equals(Period2);