class time
{
DateTime m_date;
///
/// 设置或获取时间
///
public DateTime Time { get { return m_date; } set { m_date = value; } }
public time() :this(default(DateTime))
{
}
public time(long ticks) :this(new DateTime(ticks))
{
}
public time(DateTime date)
{
m_date = date;
}
public static time operator +(time d, time t)
{
return new time(d.m_date.AddTicks(t.m_date.Ticks));
}
public static time operator -(time d, time d2)
{
return new time(d.m_date.Ticks-d2.m_date.Ticks);
}
}
测试自己弄