Freigeben über


XrmTimeSpan Struct

Definition

Represents a time interval.

public value class XrmTimeSpan
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.CodeQuality.Analyzers", "CA1066: Implement IEquatable when overriding ", Justification="FxCop Bankruptcy")]
[System.Serializable]
public struct XrmTimeSpan
[<System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.CodeQuality.Analyzers", "CA1066: Implement IEquatable when overriding ", Justification="FxCop Bankruptcy")>]
[<System.Serializable>]
type XrmTimeSpan = struct
Public Structure XrmTimeSpan
Inheritance
XrmTimeSpan
Attributes

Remarks

This is similar to System.TimeSpan but with added support for month and year.

Constructors

XrmTimeSpan(Int32, Int32, Int32)

Initializes a new instance of the XrmTimeSpan class setting the days, hours and minutes.

XrmTimeSpan(Int32, Int32, Int32, Int32, Int32)

Initializes a new instance of the XrmTimeSpan class setting the years, months, days, hours and minutes.

XrmTimeSpan(TimeSpan)

Initializes a new instance of the CrmTimeSpan class setting the time span.

Fields

Zero

Represents the zero XrmTimeSpan value. This field is read-only.

Properties

Days

Gets the number of whole days represented by the current XrmTimeSpan structure.

Hours

Gets the number of whole hours represented by the current XrmTimeSpan structure.

Minutes

Gets the number of whole minutes represented by the current XrmTimeSpan structure.

Months

Gets the number of whole months represented by the current XrmTimeSpan structure.

Years

Gets the number of whole years represented by the current XrmTimeSpan structure.

Methods

Add(DateTime)

Adds the specified date/time value to this instance.

CreateXrmTimeSpan(Int32, Int32, Int32)

Creates an instance of a XrmTimeSpan class setting the days, hours and minutes.

CreateXrmTimeSpan(Int32, Int32, Int32, Int32, Int32)

Creates an instance of a XrmTimeSpan class setting the years, months, days, hours and minutes.

CreateXrmTimeSpan(XrmTimeSpan)

Creates an instance of a XrmTimeSpan class setting the time span members.

Equals(Object)

Returns a value indicating whether this instance is equal to a specified object.

Equals(XrmTimeSpan)

Returns a value indicating whether this instance is equal to a specified XrmTimeSpan object.

GetHashCode()

Returns a hash code for this instance.

Subtract(DateTime)

Subtracts the specified XrmTimeSpan from this instance.

Operators

Equality(XrmTimeSpan, XrmTimeSpan)

Indicates whether two XrmTimeSpan instances are equal.

Inequality(XrmTimeSpan, XrmTimeSpan)

Indicates whether two XrmTimeSpan instances are not equal.

Applies to