TimeSpan

Undocumented in source.

Constructors

this
this(int hours, int minutes, int seconds)
Undocumented in source.
this
this(int days, int hours, int minutes, int seconds)
Undocumented in source.
this
this(int days, int hours, int minutes, int seconds, int milliseconds)
Undocumented in source.
this
this(long ticks)
Undocumented in source.

Members

Functions

Add
TimeSpan Add(TimeSpan ts)
Undocumented in source. Be warned that the author may not have intended to support it.
CompareTo
int CompareTo(TimeSpan ts)
Undocumented in source. Be warned that the author may not have intended to support it.
Days
int Days()
Undocumented in source. Be warned that the author may not have intended to support it.
Duration
TimeSpan Duration()
Undocumented in source. Be warned that the author may not have intended to support it.
Equals
bool Equals(TimeSpan ts)

Equal

Hours
int Hours()
Undocumented in source. Be warned that the author may not have intended to support it.
Milliseconds
int Milliseconds()
Undocumented in source. Be warned that the author may not have intended to support it.
Minutes
int Minutes()
Undocumented in source. Be warned that the author may not have intended to support it.
Negate
TimeSpan Negate()

获取TimeSpan的相反数

Seconds
int Seconds()
Undocumented in source. Be warned that the author may not have intended to support it.
Ticks
long Ticks()
Undocumented in source. Be warned that the author may not have intended to support it.
ToString
string ToString()

1.02:03:10.0200000

TotalDays
double TotalDays()
Undocumented in source. Be warned that the author may not have intended to support it.
TotalHours
double TotalHours()
Undocumented in source. Be warned that the author may not have intended to support it.
TotalMilliseconds
double TotalMilliseconds()
Undocumented in source. Be warned that the author may not have intended to support it.
TotalMinutes
double TotalMinutes()
Undocumented in source. Be warned that the author may not have intended to support it.
TotalSeconds
double TotalSeconds()
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
TimeSpan opBinary(TimeSpan ts)
Undocumented in source. Be warned that the author may not have intended to support it.
opCmp
long opCmp(TimeSpan ts)

/// operate "==" | "!=" => opCmp static bool opBinary(string op)(TimeSpan t1, TimeSpan t2) if(op == "==" || op == "!=") { switch (op) { case "==": return t1._ticks == t2._ticks; break; case "!=": return t1._ticks != t2._ticks; break; default: return true; break; } }

Static functions

Compare
int Compare(TimeSpan t1, TimeSpan t2)
Undocumented in source. Be warned that the author may not have intended to support it.
Equals
bool Equals(TimeSpan t1, TimeSpan t2)
Undocumented in source. Be warned that the author may not have intended to support it.
FromDays
TimeSpan FromDays(double value)

From

FromHours
TimeSpan FromHours(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
FromMilliseconds
TimeSpan FromMilliseconds(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
FromMinutes
TimeSpan FromMinutes(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
FromSeconds
TimeSpan FromSeconds(double value)
Undocumented in source. Be warned that the author may not have intended to support it.
From_ticks
TimeSpan From_ticks(long value)
Undocumented in source. Be warned that the author may not have intended to support it.
TryParse
bool TryParse(string input, string formatProvider, TimeSpan result)

字符串转TimeSpan

Zero
TimeSpan Zero()
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
TimeSpan opBinary(TimeSpan t1, TimeSpan t2)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

TicksPerDay
long TicksPerDay;
Undocumented in source.
TicksPerHour
long TicksPerHour;
Undocumented in source.
TicksPerMillisecond
long TicksPerMillisecond;
Undocumented in source.
TicksPerMinute
long TicksPerMinute;
Undocumented in source.
TicksPerSecond
long TicksPerSecond;
Undocumented in source.

Meta