Click or drag to resize

Duration Class

Represents temporal amount containing months, days, seconds and nanoseconds.
Remarks
A duration can hold a negative value.
Inheritance Hierarchy
SystemObject
  Neo4j.DriverTemporalValue
    Neo4j.DriverDuration

Namespace:  Neo4j.Driver
Assembly:  Neo4j.Driver (in Neo4j.Driver.dll) Version: 4.1.0
Syntax
public sealed class Duration : TemporalValue, 
	IEquatable<Duration>, IComparable, IComparable<Duration>

The Duration type exposes the following members.

Constructors
  NameDescription
Public methodDuration(Int64)
Initializes a new instance of Duration in terms of Seconds
Public methodDuration(Int64, Int32)
Initializes a new instance of Duration in terms of Seconds and Nanos
Public methodDuration(Int64, Int64, Int32)
Initializes a new instance of Duration in terms of Days, Seconds and Nanos
Public methodDuration(Int64, Int64, Int64, Int32)
Initializes a new instance of Duration with all supported temporal fields
Top
Properties
  NameDescription
Public propertyDays
The number of days in this duration.
Public propertyMonths
The number of months in this duration.
Public propertyNanos
The number of nanoseconds in this duration.
Public propertySeconds
The number of seconds in this duration.
Top
Methods
  NameDescription
Public methodCompareTo(Object)
Compares the value of this instance to a specified object which is expected to be a Duration value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified Duration value.
Public methodCompareTo(Duration)
Compares the value of this instance to a specified Duration value and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateTime value.
Public methodEquals(Object)
Returns a value indicating whether this instance is equal to a specified object.
(Overrides ObjectEquals(Object).)
Public methodEquals(Duration)
Returns a value indicating whether the value of this instance is equal to the value of the specified Duration instance.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ObjectGetHashCode.)
Public methodGetType (Inherited from Object.)
Public methodToString
Converts the value of the current Duration object to its equivalent string representation.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic memberGreaterThan
Determines whether one specified Duration is more than another specified Duration.
Public operatorStatic memberGreaterThanOrEqual
Determines whether one specified Duration represents a duration that is the same as or less than the other specified Duration
Public operatorStatic memberLessThan
Determines whether one specified Duration is less than another specified Duration.
Public operatorStatic memberLessThanOrEqual
Determines whether one specified Duration represents a duration that is the same as or more than the other specified Duration
Top
Fields
  NameDescription
Public fieldStatic memberComparer
Default comparer for Duration values.
Top
See Also