DateTimeOffset Operators and Type Conversions

July 28, 2014

The DateTimeOffset type exposes the following members.

  NameDescription
Public operator Static member Addition Adds a specified time interval to a DateTimeOffset object that has a specified date and time, and yields a DateTimeOffset object that has new a date and time.
Public operator Static member Equality Determines whether two specified DateTimeOffset objects represent the same point in time.
Public operator Static member GreaterThan Determines whether one specified DateTimeOffset object is greater than (or later than) a second specified DateTimeOffset object.
Public operator Static member GreaterThanOrEqual Determines whether one specified DateTimeOffset object is greater than or equal to a second specified DateTimeOffset object.
Public operator Static member Implicit(DateTime to DateTimeOffset) Defines an implicit conversion of a DateTime object to a DateTimeOffset object.
Public operator Static member Inequality Determines whether two specified DateTimeOffset objects refer to different points in time.
Public operator Static member LessThan Determines whether one specified DateTimeOffset object is less than a second specified DateTimeOffset object.
Public operator Static member LessThanOrEqual Determines whether one specified DateTimeOffset object is less than a second specified DateTimeOffset object.
Public operator Static member Subtraction(DateTimeOffset, DateTimeOffset) Subtracts one DateTimeOffset object from another and yields a time interval.
Public operator Static member Subtraction(DateTimeOffset, TimeSpan) Subtracts a specified time interval from a specified date and time, and yields a new date and time.
Top

Show:
© 2014 Microsoft