Пример #1
0
        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);
        }
Пример #2
0
 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);
 }