public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj.GetType() != base.GetType()) { return(false); } DateBase base2 = (DateBase)obj; return(this.internalDateValue == base2.internalDateValue); }
public static bool TryConvert(DateBase date, Type targetType, out object targetValue) { targetValue = null; if (targetType == typeof(DateTime)) { targetValue = date.Date; } else if (targetType == typeof(uint)) { targetValue = date.Ticks; } else if (targetType == typeof(long)) { targetValue = date.Ticks; } else if (targetType == typeof(string)) { targetValue = date.ToString(); } return(targetValue != null); }