The TimeOfDay type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| TimeOfDay(Int64) |
Initializes a new instance of the TimeOfDay structure to the specified number of ticks.
| |
| TimeOfDay(TimeSpan) |
Initializes a new instance of the TimeOfDay structure.
| |
| TimeOfDay(Int32, Int32, Int32) |
Initializes a new instance of the TimeOfDay structure to a specified number of hours, minutes, and seconds.
| |
| TimeOfDay(Int32, Int32, Int32, Int32) |
Initializes a new instance of the TimeOfDay structure to a specified number of days, hours, minutes, and seconds.
| |
| TimeOfDay(Int32, Int32, Int32, Int32, Int32) |
Initializes a new instance of the TimeOfDay structure to a specified number of days, hours, minutes, seconds, and milliseconds.
|
Methods
| Name | Description | |
|---|---|---|
| Add |
Adds the value of the specified TimeSpan to the value of this instance.
| |
| Compare |
Compares two instances of TimeOfDay and returns an indication of their relative values.
| |
| CompareTo(Object) | ||
| CompareTo(TimeOfDay) | ||
| Equals(Object) |
Returns a value that indicates whether this instance is equal to a specified object.
(Overrides ValueType..::..Equals(Object).) | |
| Equals(TimeOfDay) |
Returns a value that indicates whether this instance is equal to the specified TimeOfDay instance.
| |
| Equals(TimeOfDay, TimeOfDay) |
Returns a value that indicates whether two instances of TimeOfDay are equal.
| |
| Finalize | (Inherited from Object.) | |
| FromDays |
Returns a TimeOfDay that represents a specified number of days, where the specification is accurate to the nearest millisecond.
| |
| FromHours |
Returns a TimeOfDay that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
| |
| FromMilliseconds |
Returns a TimeOfDay that represents a specified number of milliseconds.
| |
| FromMinutes |
Returns a TimeOfDay that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
| |
| FromSeconds |
Returns a TimeOfDay that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
| |
| FromTicks |
Returns a TimeOfDay that represents a specified time, where the specification is in units of ticks.
| |
| GetHashCode |
Returns the hash code for this instance.
(Overrides ValueType..::..GetHashCode()()()().) | |
| GetType | (Inherited from Object.) | |
| MemberwiseClone | (Inherited from Object.) | |
| Negate |
Returns the negated TimeSpan of this instance.
| |
| Parse |
Converts the specified string representation of a time of day to its TimeOfDay equivalent.
| |
| Subtract |
Subtracts the specified TimeSpan from this instance.
| |
| ToString |
Converts the value of the current TimeOfDay object to its equivalent string representation.
(Overrides ValueType..::..ToString()()()().) | |
| ToTimeSpan |
Returns a time span value based on the current time of day value.
| |
| TryParse |
Converts the specified string representation of a time of day to its TimeOfDay equivalent.
|
Operators
| Name | Description | |
|---|---|---|
| Addition |
Adds a specified time interval to a specified time of day, yielding a new time span.
| |
| Equality | ||
| GreaterThan | ||
| GreaterThanOrEqual | ||
| ImplicitWideningImplicitImplicitImplicit(TimeSpan to TimeOfDay) |
Casts a time span value to a time of day value.
| |
| ImplicitWideningImplicitImplicitImplicit(TimeOfDay to TimeSpan) |
Casts a time of day value to a time span value.
| |
| Inequality | ||
| LessThan | ||
| LessThanOrEqual | ||
| Subtraction |
Subtracts a specified time interval from a specified time of day, yielding a new time span.
| |
| UnaryNegation |
Returns the negated time span of the specified time of day.
| |
| UnaryPlus |
Returns the time span of the specified time of day.
|
Fields
| Name | Description | |
|---|---|---|
| MaxValue |
Represents the largest possible value of TimeOfDay. This field is read-only.
| |
| MinValue |
Represents the smallest possible value of TimeOfDay. This field is read-only.
|
Properties
| Name | Description | |
|---|---|---|
| Days |
Gets the days component of the time interval represented by the current TimeOfDay structure.
| |
| Hours |
Gets the hours component of the time interval represented by the current TimeOfDay structure.
| |
| Milliseconds |
Gets the milliseconds component of the time interval represented by the current TimeOfDay structure.
| |
| Minutes |
Gets the minutes component of the time interval represented by the current TimeOfDay structure.
| |
| Seconds |
Gets the seconds component of the time interval represented by the current TimeOfDay structure.
| |
| Ticks |
Gets the number of ticks that represent the value of the current TimeOfDay structure.
| |
| TotalDays |
Gets the value of the current TimeOfDay structure expressed in whole and fractional days.
| |
| TotalHours |
Gets the value of the current TimeOfDay structure expressed in whole and fractional hours.
| |
| TotalMilliseconds |
Gets the value of the current TimeOfDay structure expressed in whole and fractional milliseconds.
| |
| TotalMinutes |
Gets the value of the current TimeOfDay structure expressed in whole and fractional minutes.
| |
| TotalSeconds |
Gets the value of the current TimeOfDay structure expressed in whole and fractional seconds.
|