Class Duration
- Namespace
- Smartsheet.Api.Models
- Assembly
- smartsheet-csharp-sdk.dll
Class encapsulating a duration object value.
public class Duration : ObjectValue
- Inheritance
-
Duration
- Implements
- Inherited Members
Constructors
Duration()
Default/empty constructor.
public Duration()
Duration(bool, bool, double, double, double, double, double, double)
Constructor that takes time in weeks, days, hours, minutes, seconds, and milliseconds. There is also a boolean for negative and elapsed.
public Duration(bool negative, bool elapsed, double weeks, double days, double hours, double minutes, double seconds, double milliseconds)
Parameters
negative
boolelapsed
boolweeks
doubledays
doublehours
doubleminutes
doubleseconds
doublemilliseconds
double
Properties
Days
The number of days for this duration.
public double? Days { get; set; }
Property Value
- double?
the number of days in duration
Elapsed
If true, indicates this duration represents elapsed time, which ignores non-working time.
public bool? Elapsed { get; set; }
Property Value
- bool?
the elapsed flag
Hours
The number of hours for this duration.
public double? Hours { get; set; }
Property Value
- double?
the number of hours in duration
Milliseconds
The number of milliseconds for this duration.
public double? Milliseconds { get; set; }
Property Value
- double?
the number of milliseconds in duration
Minutes
The number of minutes for this duration.
public double? Minutes { get; set; }
Property Value
- double?
the number of minutes in duration
Negative
When used as a predecessor’s lag value, indicates whether the lag is negative (if true), or positive (false).
public bool? Negative { get; set; }
Property Value
- bool?
the negative flag
ObjectType
Method to return the type of object this is.
public ObjectValueType ObjectType { get; }
Property Value
Seconds
The number of seconds for this duration.
public double? Seconds { get; set; }
Property Value
- double?
the number of seconds in duration
Weeks
The number of weeks for this duration.
public double? Weeks { get; set; }
Property Value
- double?
the number of weeks in duration