Struct TimeOfDay
A stop time of day.
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Assembly: cs.temp.dll.dll
Syntax
public struct TimeOfDay : IComparable
Properties
Hours
Gets or sets the hours.
Declaration
public int Hours { get; set; }
Property Value
System.Int32
|
Minutes
Gets or sets the minutes.
Declaration
public int Minutes { get; set; }
Property Value
System.Int32
|
Seconds
Gets or sets the seconds.
Declaration
public int Seconds { get; set; }
Property Value
System.Int32
|
TotalSeconds
Gets the total seconds.
Declaration
public int TotalSeconds { get; }
Property Value
System.Int32
|
Methods
CompareTo(Object)
Compare to another
Declaration
public int CompareTo(object obj)
Parameters
System.Object
obj
|
Returns
System.Int32
|
Implements
Equals(Object)
Returns true if the given object contains the same data.
Declaration
public override bool Equals(object obj)
Parameters
System.Object
obj
|
Returns
System.Boolean
|
Overrides
FromDateTime(DateTime)
Returns the time of day for the given date.
Declaration
public static TimeOfDay FromDateTime(DateTime date)
Parameters
System.DateTime
date
The date. |
Returns
TimeOfDay
|
FromString(String)
Creates a new time of day from a string in the HH:MM:SS format.
Declaration
public static TimeOfDay FromString(string timeString)
Parameters
System.String
timeString
|
Returns
TimeOfDay
|
FromTimeSpan(TimeSpan)
Returns the time of day for the given timespan.
Declaration
public static TimeOfDay FromTimeSpan(TimeSpan ts)
Parameters
System.TimeSpan
ts
The timespan. |
Returns
TimeOfDay
|
FromTotalSeconds(Int32)
Creates a new time of day from total seconds.
Declaration
public static TimeOfDay FromTotalSeconds(int totalSeconds)
Parameters
System.Int32
totalSeconds
|
Returns
TimeOfDay
|
GetHashCode()
Serves as a hash function.
Declaration
public override int GetHashCode()
Returns
System.Int32
|
Overrides
ToString()
To String
Declaration
public override string ToString()
Returns
System.String
|
Overrides
ToString(String)
D - days, HH - hours, MM - minutes, SS - seconds. If days is included, then the hours will by subtracted by 24*numdays
Declaration
public string ToString(string format)
Parameters
System.String
format
|
Returns
System.String
|
Operators
Equality(TimeOfDay, TimeOfDay)
Compares two time of days.
Declaration
public static bool operator ==(TimeOfDay a, TimeOfDay b)
Parameters
TimeOfDay
a
|
TimeOfDay
b
|
Returns
System.Boolean
|
GreaterThan(TimeOfDay, TimeOfDay)
Compares two time of days.
Declaration
public static bool operator>(TimeOfDay a, TimeOfDay b)
Parameters
TimeOfDay
a
|
TimeOfDay
b
|
Returns
System.Boolean
|
GreaterThanOrEqual(TimeOfDay, TimeOfDay)
Compares two time of days.
Declaration
public static bool operator >=(TimeOfDay a, TimeOfDay b)
Parameters
TimeOfDay
a
|
TimeOfDay
b
|
Returns
System.Boolean
|
Inequality(TimeOfDay, TimeOfDay)
Compares two time of days.
Declaration
public static bool operator !=(TimeOfDay a, TimeOfDay b)
Parameters
TimeOfDay
a
|
TimeOfDay
b
|
Returns
System.Boolean
|
LessThan(TimeOfDay, TimeOfDay)
Compares two time of days.
Declaration
public static bool operator <(TimeOfDay a, TimeOfDay b)
Parameters
TimeOfDay
a
|
TimeOfDay
b
|
Returns
System.Boolean
|