Duration

Duration structure

Represents duration in a project.

public struct Duration : IEquatable<Duration>

Properties

Name Description
IsElapsed { get; } Gets a value indicating whether time unit is elapsed. The flag which determines whether this Duration instance is elapsed.
IsEstimated { get; } Gets a value indicating whether time unit is estimated. The flag which determines whether this Duration instance is estimated.
TimeSpan { get; } Gets TimeSpan instance of this Duration object. The TimeSpan instance of this Duration object.
TimeUnit { get; } Gets time unit type for this object. The time unit type of this Duration instance.

Methods

Name Description
static Parse(Project, string) Converts the specified string to the instance of Duration struct.
Add(double) Adds specified double value to this duration.
Add(Duration) Adds specified duration to this duration.
Convert(TimeUnitType) Converts Duration object to another duration with specified time units.
Equals(Duration) Returns a value indicating whether this instance is equal to a specified object.
override Equals(object) Returns a value indicating whether this instance is equal to a specified object.
override GetHashCode() Returns a hash code value for this object.
Subtract(double) Subtracts specified double value from this duration instance.
Subtract(Duration) Subtracts specified duration from this duration instance.
ToDouble() Converts Duration object to Double value.
override ToString() Returns a string representation of this instance.
static ParseTimeSpan(string) Parses duration string in format “PT–H–M–S–”.
operator == Returns a value indicating whether this instance is equal to a specified object.
operator != Returns a value indicating whether this instance is not equal to a specified object.

See Also