Share via


XrmTimeSpan Structure

 

Applies To: Dynamics CRM 2015

Represents a time interval.

Namespace:   Microsoft.Xrm.Sdk.Workflow
Assembly:  Microsoft.Xrm.Sdk.Workflow (in Microsoft.Xrm.Sdk.Workflow.dll)

Syntax

[SerializableAttribute]
public struct XrmTimeSpan
[SerializableAttribute]
public value struct XrmTimeSpan
[<Sealed>]
[<SerializableAttribute>]
type XrmTimeSpan = struct end
<SerializableAttribute>
Public Structure XrmTimeSpan

Constructors

Name Description
System_CAPS_pubmethod XrmTimeSpan(Int32, Int32, Int32)

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

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

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

System_CAPS_pubmethod XrmTimeSpan(TimeSpan)

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

Properties

Name Description
System_CAPS_pubproperty Days

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

System_CAPS_pubproperty Hours

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

System_CAPS_pubproperty Minutes

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

System_CAPS_pubproperty Months

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

System_CAPS_pubproperty Years

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

Methods

Name Description
System_CAPS_pubmethod Add(DateTime)

Adds the specified date/time value to this instance.

System_CAPS_pubmethodSystem_CAPS_static CreateXrmTimeSpan(Int32, Int32, Int32)

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

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

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

System_CAPS_pubmethodSystem_CAPS_static CreateXrmTimeSpan(XrmTimeSpan)

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

System_CAPS_pubmethod Equals(Object)

Returns a value indicating whether this instance is equal to a specified object.(Overrides ValueType.Equals(Object).)

System_CAPS_pubmethod Equals(XrmTimeSpan)

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

System_CAPS_pubmethod GetHashCode()

Returns a hash code for this instance.(Overrides ValueType.GetHashCode().)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Subtract(DateTime)

Subtracts the specified XrmTimeSpan from this instance.

System_CAPS_pubmethod ToString()

(Inherited from ValueType.)

Fields

Name Description
System_CAPS_pubfieldSystem_CAPS_static Zero

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

Operators

Name Description
System_CAPS_puboperatorSystem_CAPS_static Equality(XrmTimeSpan, XrmTimeSpan)

Indicates whether two XrmTimeSpan instances are equal.

System_CAPS_puboperatorSystem_CAPS_static Inequality(XrmTimeSpan, XrmTimeSpan)

Indicates whether two XrmTimeSpan instances are not equal.

Remarks

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

Thread Safety

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Xrm.Sdk.Workflow Namespace

Return to top

© 2016 Microsoft. All rights reserved. Copyright