Time Struct
Namespace: PTS
Assembly: PTSframework.dll
Syntax
public struct Time : IEquatable<Time>
Constructors
Time(DateTime)
Declaration
Parameters
Type |
Name |
Description |
System.DateTime |
dt |
|
Time(Int32)
Declaration
Parameters
Type |
Name |
Description |
System.Int32 |
h |
|
Time(Int32, Int32)
Declaration
public Time(int h, int m)
Parameters
Type |
Name |
Description |
System.Int32 |
h |
|
System.Int32 |
m |
|
Time(Int32, Int32, Int32)
Declaration
public Time(int h, int m, int s)
Parameters
Type |
Name |
Description |
System.Int32 |
h |
|
System.Int32 |
m |
|
System.Int32 |
s |
|
Time(String)
Declaration
public Time(string timeText)
Parameters
Type |
Name |
Description |
System.String |
timeText |
|
Time(String, String)
Declaration
public Time(string format, string value)
Parameters
Type |
Name |
Description |
System.String |
format |
|
System.String |
value |
|
Time(TimeSpan)
Declaration
public Time(TimeSpan span)
Parameters
Type |
Name |
Description |
System.TimeSpan |
span |
|
Fields
Hours
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Minutes
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Seconds
Declaration
Field Value
Type |
Description |
System.Int32 |
|
Properties
IsZeroTime
Declaration
public bool IsZeroTime { get; }
Property Value
Type |
Description |
System.Boolean |
|
TotalSeconds
Declaration
public int TotalSeconds { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Equals(Time)
Declaration
public bool Equals(Time other)
Parameters
Type |
Name |
Description |
Time |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ValueType.Equals(System.Object)
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Overrides
System.ValueType.GetHashCode()
GetMinuteString()
Declaration
public string GetMinuteString()
Returns
Type |
Description |
System.String |
|
Make(Int32, Int32, Int32)
Declaration
public static Time Make(int hour = 0, int minute = 0, int second = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
hour |
|
System.Int32 |
minute |
|
System.Int32 |
second |
|
Returns
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.ValueType.ToString()
Operators
Equality(Time, Time)
Declaration
public static bool operator ==(Time a, Time b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
GreaterThan(Time, Time)
Declaration
public static bool operator>(Time a, Time b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implicit(Time to DateTime)
Declaration
public static implicit operator DateTime(Time time)
Parameters
Type |
Name |
Description |
Time |
time |
|
Returns
Type |
Description |
System.DateTime |
|
Implicit(DateTime to Time)
Declaration
public static implicit operator Time(DateTime dateTime)
Parameters
Type |
Name |
Description |
System.DateTime |
dateTime |
|
Returns
Inequality(Time, Time)
Declaration
public static bool operator !=(Time a, Time b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
LessThan(Time, Time)
Declaration
public static bool operator <(Time a, Time b)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Implements
System.IEquatable<T>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Extension Methods