Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
12 contributors

Users who have contributed to this file

@mairaw @yishengjin1413 @TianqiZhang @dend @rpetrusha @nschonni @openpublishbuild @guardrex @MSshujia @pkulikov @doctordns @imba-tjd
5352 lines (4772 sloc) 368 KB
<Type Name="TimeSpan" FullName="System.TimeSpan">
<TypeSignature Language="C#" Value="public struct TimeSpan : IComparable, IComparable&lt;TimeSpan&gt;, IEquatable&lt;TimeSpan&gt;, IFormattable" />
<TypeSignature Language="ILAsm" Value=".class public sequential ansi serializable sealed beforefieldinit TimeSpan extends System.ValueType implements class System.IComparable, class System.IComparable`1&lt;valuetype System.TimeSpan&gt;, class System.IEquatable`1&lt;valuetype System.TimeSpan&gt;, class System.IFormattable" />
<TypeSignature Language="DocId" Value="T:System.TimeSpan" />
<TypeSignature Language="VB.NET" Value="Public Structure TimeSpan&#xA;Implements IComparable, IComparable(Of TimeSpan), IEquatable(Of TimeSpan), IFormattable" />
<TypeSignature Language="C++ CLI" Value="public value class TimeSpan : IComparable, IComparable&lt;TimeSpan&gt;, IEquatable&lt;TimeSpan&gt;, IFormattable" />
<TypeSignature Language="F#" Value="type TimeSpan = struct&#xA; interface IFormattable" />
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IComparable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IComparable&lt;System.TimeSpan&gt;</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IEquatable&lt;System.TimeSpan&gt;</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IFormattable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netframework-4.8">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-3.0;netstandard-2.1">
<AttributeName>System.Runtime.CompilerServices.IsReadOnly</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Represents a time interval.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.TimeSpan> object represents a time interval (duration of time or elapsed time) that is measured as a positive or negative number of days, hours, minutes, seconds, and fractions of a second. The <xref:System.TimeSpan> structure can also be used to represent the time of day, but only if the time is unrelated to a particular date. Otherwise, the <xref:System.DateTime> or <xref:System.DateTimeOffset> structure should be used instead. (For more information about using the <xref:System.TimeSpan> structure to reflect the time of day, see [Choosing Between DateTime, DateTimeOffset, TimeSpan, and TimeZoneInfo](~/docs/standard/datetime/choosing-between-datetime.md).)
> [!NOTE]
> A <xref:System.TimeSpan> value represents a time interval and can be expressed as a particular number of days, hours, minutes, seconds, and milliseconds. Because it represents a general interval without reference to a particular start or end point, it cannot be expressed in terms of years and months, both of which have a variable number of days. It differs from a <xref:System.DateTime> value, which represents a date and time without reference to a particular time zone, or a <xref:System.DateTimeOffset> value, which represents a specific moment of time.
The largest unit of time that the <xref:System.TimeSpan> structure uses to measure duration is a day. Time intervals are measured in days for consistency, because the number of days in larger units of time, such as months and years, varies.
The value of a <xref:System.TimeSpan> object is the number of ticks that equal the represented time interval. A tick is equal to 100 nanoseconds, or one ten-millionth of a second. The value of a <xref:System.TimeSpan> object can range from <xref:System.TimeSpan.MinValue?displayProperty=nameWithType> to <xref:System.TimeSpan.MaxValue?displayProperty=nameWithType>.
## Instantiating a TimeSpan Value
You can instantiate a <xref:System.TimeSpan> value in a number of ways:
- By calling its implicit default constructor. This creates an object whose value is <xref:System.TimeSpan.Zero?displayProperty=nameWithType>, as the following example shows.
[!code-csharp[System.TimeSpan.Class#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/instantiate1.cs#2)]
[!code-vb[System.TimeSpan.Class#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/instantiate1.vb#2)]
- By calling one of its explicit constructors. The following example initializes a <xref:System.TimeSpan> value to a specified number of hours, minutes, and seconds.
[!code-csharp[System.TimeSpan.Class#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/instantiate1.cs#3)]
[!code-vb[System.TimeSpan.Class#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/instantiate1.vb#3)]
- By calling a method or performing an operation that returns a <xref:System.TimeSpan> value. For example, you can instantiate a <xref:System.TimeSpan> value that represents the interval between two date and time values, as the following example shows.
[!code-csharp[System.TimeSpan.Class#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/instantiate1.cs#4)]
[!code-vb[System.TimeSpan.Class#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/instantiate1.vb#4)]
You can also initialize a <xref:System.TimeSpan> object to a zero time value in this way, as the following example shows.
[!code-csharp[System.TimeSpan.Class#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/zero1.cs#6)]
[!code-vb[System.TimeSpan.Class#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/zero1.vb#6)]
<xref:System.TimeSpan> values are returned by arithmetic operators and methods of the <xref:System.DateTime>, <xref:System.DateTimeOffset>, and <xref:System.TimeSpan> structures.
- By parsing the string representation of a <xref:System.TimeSpan> value. You can use the <xref:System.TimeSpan.Parse%2A> and <xref:System.TimeSpan.TryParse%2A> methods to convert strings that contain time intervals to <xref:System.TimeSpan> values. The following example uses the <xref:System.TimeSpan.Parse%2A> method to convert an array of strings to <xref:System.TimeSpan> values.
[!code-csharp[System.TimeSpan.Class#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/instantiate1.cs#5)]
[!code-vb[System.TimeSpan.Class#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/instantiate1.vb#5)]
In addition, you can define the precise format of the input string to be parsed and converted to a <xref:System.TimeSpan> value by calling the <xref:System.TimeSpan.ParseExact%2A> or <xref:System.TimeSpan.TryParseExact%2A> method.
## Performing Operations on TimeSpan Values
You can add and subtract time durations either by using the <xref:System.TimeSpan.op_Addition%2A> and <xref:System.TimeSpan.op_Subtraction%2A> operators, or by calling the <xref:System.TimeSpan.Add%2A> and <xref:System.TimeSpan.Subtract%2A> methods. You can also compare two time durations by calling the <xref:System.TimeSpan.Compare%2A>, <xref:System.TimeSpan.CompareTo%2A>, and <xref:System.TimeSpan.Equals%2A> methods. The <xref:System.TimeSpan> structure also includes the <xref:System.TimeSpan.Duration%2A> and <xref:System.TimeSpan.Negate%2A> methods, which convert time intervals to positive and negative values,
The range of <xref:System.TimeSpan> values is <xref:System.TimeSpan.MinValue> to <xref:System.TimeSpan.MaxValue>.
## Formatting a TimeSpan Value
A <xref:System.TimeSpan> value can be represented as [*-*]*d*.*hh*:*mm*:*ss*.*ff*, where the optional minus sign indicates a negative time interval, the *d* component is days, *hh* is hours as measured on a 24-hour clock, *mm* is minutes, *ss* is seconds, and *ff* is fractions of a second. That is, a time interval consists of a positive or negative number of days without a time of day, or a number of days with a time of day, or only a time of day.
Beginning with the [!INCLUDE[net_v40_long](~/includes/net-v40-long-md.md)], the <xref:System.TimeSpan> structure supports culture-sensitive formatting through the overloads of its <xref:System.TimeSpan.ToString%2A> method, which converts a <xref:System.TimeSpan> value to its string representation. The default <xref:System.TimeSpan.ToString?displayProperty=nameWithType> method returns a time interval by using an invariant format that is identical to its return value in previous versions of the .NET Framework. The <xref:System.TimeSpan.ToString%28System.String%29?displayProperty=nameWithType> overload lets you specify a format string that defines the string representation of the time interval. The <xref:System.TimeSpan.ToString%28System.String%2CSystem.IFormatProvider%29?displayProperty=nameWithType> overload lets you specify a format string and the culture whose formatting conventions are used to create the string representation of the time interval. <xref:System.TimeSpan> supports both standard and custom format strings. (For more information, see [Standard TimeSpan Format Strings](~/docs/standard/base-types/standard-timespan-format-strings.md) and [Custom TimeSpan Format Strings](~/docs/standard/base-types/custom-timespan-format-strings.md).) However, only standard format strings are culture-sensitive.
## Restoring Legacy TimeSpan Formatting
In some cases, code that successfully formats <xref:System.TimeSpan> values in [!INCLUDE[net_v35_short](~/includes/net-v35-short-md.md)] and earlier versions fails in [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)]. This is most common in code that calls a [<TimeSpan_LegacyFormatMode> element](~/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md) method to format a <xref:System.TimeSpan> value with a format string. The following example successfully formats a <xref:System.TimeSpan> value in [!INCLUDE[net_v35_short](~/includes/net-v35-short-md.md)] and earlier versions, but throws an exception in [!INCLUDE[net_v40_short](~/includes/net-v40-short-md.md)] and later versions. Note that it attempts to format a <xref:System.TimeSpan> value by using an unsupported format specifier, which is ignored in [!INCLUDE[net_v35_short](~/includes/net-v35-short-md.md)] and earlier versions.
[!code-csharp[System.TimeSpan.Class.Legacy#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class.legacy/cs/legacycode1.cs#1)]
[!code-vb[System.TimeSpan.Class.Legacy#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class.legacy/vb/legacycode1.vb#1)]
If you cannot modify the code, you can restore the legacy formatting of <xref:System.TimeSpan> values in one of the following ways:
- By creating a configuration file that contains the [<TimeSpan_LegacyFormatMode> element](~/docs/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element.md). Setting this element's `enabled` attribute to `true` restores legacy <xref:System.TimeSpan> formatting on a per-application basis.
- By setting the "NetFx40_TimeSpanLegacyFormatMode" compatibility switch when you create an application domain. This enables legacy <xref:System.TimeSpan> formatting on a per-application-domain basis. The following example creates an application domain that uses legacy <xref:System.TimeSpan> formatting.
[!code-csharp[System.TimeSpan.Class.AppDomain#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class.appdomain/cs/perappdomain1.cs#1)]
[!code-vb[System.TimeSpan.Class.AppDomain#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class.appdomain/vb/perappdomain1.vb#1)]
When the following code executes in the new application domain, it reverts to legacy <xref:System.TimeSpan> formatting behavior.
[!code-csharp[System.TimeSpan.Class.AppDomain#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class.appdomain/cs/showtimespan.cs#2)]
[!code-vb[System.TimeSpan.Class.AppDomain#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class.appdomain/vb/showtimespan.vb#2)]
## Examples
The following example instantiates a <xref:System.TimeSpan> object that represents the difference between two dates. It then displays the <xref:System.TimeSpan> object's properties.
[!code-csharp[System.TimeSpan.Class#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.class/cs/structure1.cs#1)]
[!code-vb[System.TimeSpan.Class#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.class/vb/structure1.vb#1)]
[!code-powershell[System.TimeSpan.Class#1](~/samples/snippets/powershell/VS_Snippets_CLR_System/system.timespan.class/ps/structure1.ps1)]
]]></format>
</remarks>
<altmember cref="T:System.DateTime" />
<altmember cref="T:System.DateTimeOffset" />
<altmember cref="T:System.Globalization.Calendar" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.TimeSpan" /> structure.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TimeSpan (long ticks);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int64 ticks) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.#ctor(System.Int64)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (ticks As Long)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan(long ticks);" />
<MemberSignature Language="F#" Value="new TimeSpan : int64 -&gt; TimeSpan" Usage="new System.TimeSpan ticks" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="ticks" Type="System.Int64" />
</Parameters>
<Docs>
<param name="ticks">A time period expressed in 100-nanosecond units.</param>
<summary>Initializes a new instance of the <see cref="T:System.TimeSpan" /> structure to the specified number of ticks.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond.
## Examples
The following example creates several <xref:System.TimeSpan> objects using the constructor overload that initializes a <xref:System.TimeSpan> to a specified number of ticks.
[!code-cpp[System.TimeSpan.Ctor#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CPP/ctorl.cpp#1)]
[!code-csharp[System.TimeSpan.Ctor#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CS/ctorl.cs#1)]
[!code-vb[System.TimeSpan.Ctor#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Ctor/VB/ctorl.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.TimeSpan.Ticks" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TimeSpan (int hours, int minutes, int seconds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 hours, int32 minutes, int32 seconds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.#ctor(System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (hours As Integer, minutes As Integer, seconds As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan(int hours, int minutes, int seconds);" />
<MemberSignature Language="F#" Value="new TimeSpan : int * int * int -&gt; TimeSpan" Usage="new System.TimeSpan (hours, minutes, seconds)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="hours" Type="System.Int32" />
<Parameter Name="minutes" Type="System.Int32" />
<Parameter Name="seconds" Type="System.Int32" />
</Parameters>
<Docs>
<param name="hours">Number of hours.</param>
<param name="minutes">Number of minutes.</param>
<param name="seconds">Number of seconds.</param>
<summary>Initializes a new instance of the <see cref="T:System.TimeSpan" /> structure to a specified number of hours, minutes, and seconds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The specified `hours`, `minutes`, and `seconds` are converted to ticks, and that value initializes this instance.
## Examples
The following example creates several <xref:System.TimeSpan> objects using the constructor overload that initializes a <xref:System.TimeSpan> to a specified number of hours, minutes, and seconds.
[!code-cpp[System.TimeSpan.Ctor#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CPP/ctoriii.cpp#2)]
[!code-csharp[System.TimeSpan.Ctor#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CS/ctoriii.cs#2)]
[!code-vb[System.TimeSpan.Ctor#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Ctor/VB/ctoriii.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The parameters specify a <see cref="T:System.TimeSpan" /> value less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
<altmember cref="T:System.Int64" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TimeSpan (int days, int hours, int minutes, int seconds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 days, int32 hours, int32 minutes, int32 seconds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.#ctor(System.Int32,System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (days As Integer, hours As Integer, minutes As Integer, seconds As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan(int days, int hours, int minutes, int seconds);" />
<MemberSignature Language="F#" Value="new TimeSpan : int * int * int * int -&gt; TimeSpan" Usage="new System.TimeSpan (days, hours, minutes, seconds)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="days" Type="System.Int32" />
<Parameter Name="hours" Type="System.Int32" />
<Parameter Name="minutes" Type="System.Int32" />
<Parameter Name="seconds" Type="System.Int32" />
</Parameters>
<Docs>
<param name="days">Number of days.</param>
<param name="hours">Number of hours.</param>
<param name="minutes">Number of minutes.</param>
<param name="seconds">Number of seconds.</param>
<summary>Initializes a new instance of the <see cref="T:System.TimeSpan" /> structure to a specified number of days, hours, minutes, and seconds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The specified `days`, `hours`, `minutes`, and `seconds` are converted to ticks, and that value initializes this instance.
## Examples
The following example creates several <xref:System.TimeSpan> objects using the constructor overload that initializes a <xref:System.TimeSpan> to a specified number of days, hours, minutes, and seconds.
[!code-cpp[System.TimeSpan.Ctor#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CPP/ctoriiii.cpp#3)]
[!code-csharp[System.TimeSpan.Ctor#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CS/ctoriiii.cs#3)]
[!code-vb[System.TimeSpan.Ctor#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Ctor/VB/ctoriiii.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The parameters specify a <see cref="T:System.TimeSpan" /> value less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
<altmember cref="T:System.Int64" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TimeSpan (int days, int hours, int minutes, int seconds, int milliseconds);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(int32 days, int32 hours, int32 minutes, int32 seconds, int32 milliseconds) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.#ctor(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (days As Integer, hours As Integer, minutes As Integer, seconds As Integer, milliseconds As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan(int days, int hours, int minutes, int seconds, int milliseconds);" />
<MemberSignature Language="F#" Value="new TimeSpan : int * int * int * int * int -&gt; TimeSpan" Usage="new System.TimeSpan (days, hours, minutes, seconds, milliseconds)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="days" Type="System.Int32" />
<Parameter Name="hours" Type="System.Int32" />
<Parameter Name="minutes" Type="System.Int32" />
<Parameter Name="seconds" Type="System.Int32" />
<Parameter Name="milliseconds" Type="System.Int32" />
</Parameters>
<Docs>
<param name="days">Number of days.</param>
<param name="hours">Number of hours.</param>
<param name="minutes">Number of minutes.</param>
<param name="seconds">Number of seconds.</param>
<param name="milliseconds">Number of milliseconds.</param>
<summary>Initializes a new instance of the <see cref="T:System.TimeSpan" /> structure to a specified number of days, hours, minutes, seconds, and milliseconds.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The specified `days`, `hours`, `minutes`, `seconds`, and `milliseconds` are converted to ticks, and that value initializes this instance.
## Examples
The following example creates several <xref:System.TimeSpan> objects using the constructor overload that initializes a <xref:System.TimeSpan> to a specified number of days, hours, minutes, seconds, and milliseconds.
[!code-cpp[System.TimeSpan.Ctor#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CPP/ctoriiiii.cpp#4)]
[!code-csharp[System.TimeSpan.Ctor#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Ctor/CS/ctoriiiii.cs#4)]
[!code-vb[System.TimeSpan.Ctor#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Ctor/VB/ctoriiiii.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentOutOfRangeException">The parameters specify a <see cref="T:System.TimeSpan" /> value less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
<altmember cref="T:System.Int64" />
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public TimeSpan Add (TimeSpan ts);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.TimeSpan Add(valuetype System.TimeSpan ts) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Add(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Function Add (ts As TimeSpan) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan Add(TimeSpan ts);" />
<MemberSignature Language="F#" Value="member this.Add : TimeSpan -&gt; TimeSpan" Usage="timeSpan.Add ts" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="ts" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="ts">The time interval to add.</param>
<summary>Returns a new <see cref="T:System.TimeSpan" /> object whose value is the sum of the specified <see cref="T:System.TimeSpan" /> object and this instance.</summary>
<returns>A new object that represents the value of this instance plus the value of <paramref name="ts" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The return value must be between <xref:System.TimeSpan.MinValue?displayProperty=nameWithType> and <xref:System.TimeSpan.MaxValue?displayProperty=nameWithType>; otherwise, an exception is thrown.
The return value is a new <xref:System.TimeSpan>; the original <xref:System.TimeSpan> is not modified.
## Examples
The following example calls the <xref:System.TimeSpan.Add%2A> method to add each element in an array of time intervals to a base <xref:System.TimeSpan> value.
[!code-csharp[System.TimeSpan.Add#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.add/cs/add1.cs#1)]
[!code-vb[System.TimeSpan.Add#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.add/vb/add1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">The resulting <see cref="T:System.TimeSpan" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
<altmember cref="M:System.DateTime.Add(System.TimeSpan)" />
</Docs>
</Member>
<Member MemberName="Compare">
<MemberSignature Language="C#" Value="public static int Compare (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 Compare(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Compare (t1 As TimeSpan, t2 As TimeSpan) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static int Compare(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member Compare : TimeSpan * TimeSpan -&gt; int" Usage="System.TimeSpan.Compare (t1, t2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Compares two <see cref="T:System.TimeSpan" /> values and returns an integer that indicates whether the first value is shorter than, equal to, or longer than the second value.</summary>
<returns>One of the following values.
<list type="table"><listheader><term> Value
</term><description> Description
</description></listheader><item><term> -1
</term><description><paramref name="t1" /> is shorter than <paramref name="t2" />.
</description></item><item><term> 0
</term><description><paramref name="t1" /> is equal to <paramref name="t2" />.
</description></item><item><term> 1
</term><description><paramref name="t1" /> is longer than <paramref name="t2" />.
</description></item></list></returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example uses the <xref:System.TimeSpan.Compare%2A> method to compare several <xref:System.TimeSpan> objects with a <xref:System.TimeSpan> object whose value is a 2-hour time interval.
[!code-csharp[System.TimeSpan.Compare#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.compare/cs/compare1.cs#1)]
[!code-vb[System.TimeSpan.Compare#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.compare/vb/compare1.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
<altmember cref="M:System.TimeSpan.Equals(System.Object)" />
</Docs>
</Member>
<MemberGroup MemberName="CompareTo">
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Compares this instance to a specified object or <see cref="T:System.TimeSpan" /> object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object or <see cref="T:System.TimeSpan" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The two overloads of the <xref:System.TimeSpan.CompareTo%2A> method return a signed number that indicates the relative value of this instance and the `value` argument, as shown in the following table.
|Value|Description|
|-----------|-----------------|
|Less than zero|This instance is shorter than `value`.|
|Zero|This instance is the same as `value`.|
|Greater than zero|This instance is longer than `value`.|
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="CompareTo">
<MemberSignature Language="C#" Value="public int CompareTo (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 CompareTo(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.CompareTo(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Function CompareTo (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual int CompareTo(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member CompareTo : obj -&gt; int&#xA;override this.CompareTo : obj -&gt; int" Usage="timeSpan.CompareTo value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IComparable.CompareTo(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="value">An object to compare, or <see langword="null" />.</param>
<summary>Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.</summary>
<returns>One of the following values.
<list type="table"><listheader><term> Value
</term><description> Description
</description></listheader><item><term> -1
</term><description> This instance is shorter than <paramref name="value" />.
</description></item><item><term> 0
</term><description> This instance is equal to <paramref name="value" />.
</description></item><item><term> 1
</term><description> This instance is longer than <paramref name="value" />.
-or-
<paramref name="value" /> is <see langword="null" />.
</description></item></list></returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Any instance of <xref:System.TimeSpan>, regardless of its value, is considered greater than `null`.
The `value` parameter must be an instance of <xref:System.TimeSpan> or `null`; otherwise, an exception is thrown.
## Examples
The following example compares several <xref:System.TimeSpan> structures and other objects to a reference <xref:System.TimeSpan> structure using the <xref:System.TimeSpan.CompareTo%2A> method.
[!code-cpp[System.TimeSpan.Compare_Equals#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CPP/cto_eq_obj.cpp#1)]
[!code-csharp[System.TimeSpan.Compare_Equals#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CS/cto_eq_obj.cs#1)]
[!code-vb[System.TimeSpan.Compare_Equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/VB/cto_eq_obj.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is not a <see cref="T:System.TimeSpan" />.</exception>
<altmember cref="T:System.Object" />
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.Equals(System.Object)" />
</Docs>
</Member>
<Member MemberName="CompareTo">
<MemberSignature Language="C#" Value="public int CompareTo (TimeSpan value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 CompareTo(valuetype System.TimeSpan value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.CompareTo(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Function CompareTo (value As TimeSpan) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual int CompareTo(TimeSpan value);" />
<MemberSignature Language="F#" Value="abstract member CompareTo : TimeSpan -&gt; int&#xA;override this.CompareTo : TimeSpan -&gt; int" Usage="timeSpan.CompareTo value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IComparable`1.CompareTo(`0)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.TimeSpan" Index="0" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.5;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="value">An object to compare to this instance.</param>
<summary>Compares this instance to a specified <see cref="T:System.TimeSpan" /> object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the <see cref="T:System.TimeSpan" /> object.</summary>
<returns>A signed number indicating the relative values of this instance and <paramref name="value" />.
<list type="table"><listheader><term> Value
</term><description> Description
</description></listheader><item><term> A negative integer
</term><description> This instance is shorter than <paramref name="value" />.
</description></item><item><term> Zero
</term><description> This instance is equal to <paramref name="value" />.
</description></item><item><term> A positive integer
</term><description> This instance is longer than <paramref name="value" />.
</description></item></list></returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method implements the <xref:System.IComparable%601?displayProperty=nameWithType> interface and performs slightly better than the <xref:System.TimeSpan.CompareTo%2A?displayProperty=nameWithType> method because it does not have to convert the `value` parameter to an object.
## Examples
The following example demonstrates generic and nongeneric versions of the <xref:System.TimeSpan.CompareTo%2A> method for several value and reference types.
[!code-cpp[T.CompareTo#1](~/samples/snippets/cpp/VS_Snippets_CLR/T.CompareTo/CPP/cat.cpp#1)]
[!code-csharp[T.CompareTo#1](~/samples/snippets/csharp/VS_Snippets_CLR/T.CompareTo/CS/cat.cs#1)]
[!code-vb[T.CompareTo#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/T.CompareTo/VB/cat.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Days">
<MemberSignature Language="C#" Value="public int Days { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Days" />
<MemberSignature Language="DocId" Value="P:System.TimeSpan.Days" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Days As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Days { int get(); };" />
<MemberSignature Language="F#" Value="member this.Days : int" Usage="System.TimeSpan.Days" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the days component of the time interval represented by the current <see cref="T:System.TimeSpan" /> structure.</summary>
<value>The day component of this instance. The return value can be positive or negative.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.TimeSpan> value can be represented as [*-*]*d*.*hh*:*mm*:*ss*.*ff*, where the optional minus sign indicates a negative time interval, the *d* component is days, *hh* is hours as measured on a 24-hour clock, *mm* is minutes, *ss* is seconds, and *ff* is fractions of a second. The value of the <xref:System.TimeSpan.Days%2A> property is the day component, *d*.
The <xref:System.TimeSpan.Days%2A> property represents whole days, whereas the <xref:System.TimeSpan.TotalDays%2A> property represents whole and fractional days.
## Examples
The following example creates several <xref:System.TimeSpan> objects and displays the <xref:System.TimeSpan.Days%2A> property of each.
[!code-cpp[System.TimeSpan.Properties#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp#1)]
[!code-csharp[System.TimeSpan.Properties#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs#1)]
[!code-vb[System.TimeSpan.Properties#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.TimeSpan.TotalDays" />
<altmember cref="P:System.TimeSpan.Ticks" />
<altmember cref="P:System.TimeSpan.Milliseconds" />
<altmember cref="P:System.TimeSpan.Seconds" />
<altmember cref="P:System.TimeSpan.Minutes" />
<altmember cref="P:System.TimeSpan.Hours" />
</Docs>
</Member>
<Member MemberName="Divide">
<MemberSignature Language="C#" Value="public TimeSpan Divide (double divisor);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.TimeSpan Divide(float64 divisor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Divide(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Function Divide (divisor As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan Divide(double divisor);" />
<MemberSignature Language="F#" Value="member this.Divide : double -&gt; TimeSpan" Usage="timeSpan.Divide divisor" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="divisor" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="divisor">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Divide">
<MemberSignature Language="C#" Value="public double Divide (TimeSpan ts);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance float64 Divide(valuetype System.TimeSpan ts) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Divide(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Function Divide (ts As TimeSpan) As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; double Divide(TimeSpan ts);" />
<MemberSignature Language="F#" Value="member this.Divide : TimeSpan -&gt; double" Usage="timeSpan.Divide ts" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="ts" Type="System.TimeSpan" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="ts">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Duration">
<MemberSignature Language="C#" Value="public TimeSpan Duration ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.TimeSpan Duration() cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Duration" />
<MemberSignature Language="VB.NET" Value="Public Function Duration () As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan Duration();" />
<MemberSignature Language="F#" Value="member this.Duration : unit -&gt; TimeSpan" Usage="timeSpan.Duration " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a new <see cref="T:System.TimeSpan" /> object whose value is the absolute value of the current <see cref="T:System.TimeSpan" /> object.</summary>
<returns>A new object whose value is the absolute value of the current <see cref="T:System.TimeSpan" /> object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example applies the <xref:System.TimeSpan.Duration%2A> method to several <xref:System.TimeSpan> objects.
[!code-cpp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CPP/dura_nega_una.cpp#1)]
[!code-csharp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CS/dura_nega_una.cs#1)]
[!code-vb[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/VB/dura_nega_una.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">The value of this instance is <see cref="F:System.TimeSpan.MinValue" />.</exception>
<altmember cref="P:System.TimeSpan.Ticks" />
</Docs>
</Member>
<MemberGroup MemberName="Equals">
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Returns a value indicating whether two instances of <see cref="T:System.TimeSpan" /> are equal.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public override bool Equals (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool Equals(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Equals(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function Equals (value As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool Equals(System::Object ^ value);" />
<MemberSignature Language="F#" Value="override this.Equals : obj -&gt; bool" Usage="timeSpan.Equals value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An object to compare with this instance.</param>
<summary>Returns a value indicating whether this instance is equal to a specified object.</summary>
<returns>
<see langword="true" /> if <paramref name="value" /> is a <see cref="T:System.TimeSpan" /> object that represents the same time interval as the current <see cref="T:System.TimeSpan" /> structure; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example compares several <xref:System.TimeSpan> and other objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.Equals%2A> method.
[!code-cpp[System.TimeSpan.Compare_Equals#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CPP/cto_eq_obj.cpp#1)]
[!code-csharp[System.TimeSpan.Compare_Equals#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CS/cto_eq_obj.cs#1)]
[!code-vb[System.TimeSpan.Compare_Equals#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/VB/cto_eq_obj.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Object" />
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public bool Equals (TimeSpan obj);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Equals(valuetype System.TimeSpan obj) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Equals(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Function Equals (obj As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual bool Equals(TimeSpan obj);" />
<MemberSignature Language="F#" Value="override this.Equals : TimeSpan -&gt; bool" Usage="timeSpan.Equals obj" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IEquatable`1.Equals(`0)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="obj" Type="System.TimeSpan" Index="0" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.5;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="obj">An object to compare with this instance.</param>
<summary>Returns a value indicating whether this instance is equal to a specified <see cref="T:System.TimeSpan" /> object.</summary>
<returns>
<see langword="true" /> if <paramref name="obj" /> represents the same time interval as this instance; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method implements the <xref:System.IEquatable%601?displayProperty=nameWithType> interface, and performs slightly better than <xref:System.TimeSpan.Equals%2A> because it does not have to convert the `obj` parameter to an object.
## Examples
The following example demonstrates generic and nongeneric versions of the <xref:System.TimeSpan.CompareTo%2A> method for several value and reference types.
[!code-cpp[T.CompareTo#1](~/samples/snippets/cpp/VS_Snippets_CLR/T.CompareTo/CPP/cat.cpp#1)]
[!code-csharp[T.CompareTo#1](~/samples/snippets/csharp/VS_Snippets_CLR/T.CompareTo/CS/cat.cs#1)]
[!code-vb[T.CompareTo#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/T.CompareTo/VB/cat.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Equals(System.Object)" />
<altmember cref="Overload:System.TimeSpan.CompareTo" />
</Docs>
</Member>
<Member MemberName="Equals">
<MemberSignature Language="C#" Value="public static bool Equals (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool Equals(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Equals(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Equals (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool Equals(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member Equals : TimeSpan * TimeSpan -&gt; bool" Usage="System.TimeSpan.Equals (t1, t2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Returns a value that indicates whether two specified instances of <see cref="T:System.TimeSpan" /> are equal.</summary>
<returns>
<see langword="true" /> if the values of <paramref name="t1" /> and <paramref name="t2" /> are equal; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> object using the static <xref:System.TimeSpan.Equals%2A> method.
[!code-cpp[System.TimeSpan.Compare_Equals#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CPP/comp_equal.cpp#2)]
[!code-csharp[System.TimeSpan.Compare_Equals#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/CS/comp_equal.cs#2)]
[!code-vb[System.TimeSpan.Compare_Equals#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Compare_Equals/VB/comp_equal.vb#2)]
]]></format>
</remarks>
<altmember cref="T:System.Boolean" />
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="FromDays">
<MemberSignature Language="C#" Value="public static TimeSpan FromDays (double value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromDays(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromDays(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromDays (value As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromDays(double value);" />
<MemberSignature Language="F#" Value="static member FromDays : double -&gt; TimeSpan" Usage="System.TimeSpan.FromDays value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" />
</Parameters>
<Docs>
<param name="value">A number of days, accurate to the nearest millisecond.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified number of days, where the specification is accurate to the nearest millisecond.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `value` parameter is converted to milliseconds, which is converted to ticks, and that number of ticks is used to initialize the new <xref:System.TimeSpan>. Therefore, `value` will only be considered accurate to the nearest millisecond. Note that, because of the loss of precision of the <xref:System.Double> data type, this conversion can cause an <xref:System.OverflowException> for values that are near to but still in the range of either <xref:System.TimeSpan.MinValue> or <xref:System.TimeSpan.MaxValue>. For example, this causes an <xref:System.OverflowException> in the following attempt to instantiate a <xref:System.TimeSpan> object.
[!code-csharp[System.TimeSpan.FromMinutes#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/cs/System.TimeSpan.FromMinutes.cs#2)]
[!code-vb[System.TimeSpan.FromMinutes#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/vb/System.TimeSpan.FromMinutes.vb#2)]
## Examples
The following example creates several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.FromDays%2A> method.
[!code-cpp[System.TimeSpan.From#6](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/fromdays.cpp#6)]
[!code-csharp[System.TimeSpan.From#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/fromdays.cs#6)]
[!code-vb[System.TimeSpan.From#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/fromdays.vb#6)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.PositiveInfinity" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.NegativeInfinity" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />.</exception>
<altmember cref="T:System.Double" />
<altmember cref="M:System.TimeSpan.FromTicks(System.Int64)" />
<altmember cref="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromSeconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromMinutes(System.Double)" />
<altmember cref="M:System.TimeSpan.FromHours(System.Double)" />
</Docs>
</Member>
<Member MemberName="FromHours">
<MemberSignature Language="C#" Value="public static TimeSpan FromHours (double value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromHours(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromHours(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromHours (value As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromHours(double value);" />
<MemberSignature Language="F#" Value="static member FromHours : double -&gt; TimeSpan" Usage="System.TimeSpan.FromHours value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" />
</Parameters>
<Docs>
<param name="value">A number of hours accurate to the nearest millisecond.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified number of hours, where the specification is accurate to the nearest millisecond.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `value` parameter is converted to milliseconds, which is converted to ticks, and that number of ticks is used to initialize the new <xref:System.TimeSpan>. Therefore, `value` will only be considered accurate to the nearest millisecond. Note that, because of the loss of precision of the <xref:System.Double> data type, this conversion can generate an <xref:System.OverflowException> for values that are near to but still in the range of either <xref:System.TimeSpan.MinValue> or <xref:System.TimeSpan.MaxValue>. For example, this causes an <xref:System.OverflowException> in the following attempt to instantiate a <xref:System.TimeSpan> object.
[!code-csharp[System.TimeSpan.FromMinutes#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/cs/System.TimeSpan.FromMinutes.cs#3)]
[!code-vb[System.TimeSpan.FromMinutes#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/vb/System.TimeSpan.FromMinutes.vb#3)]
## Examples
The following example creates several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.FromHours%2A> method.
[!code-cpp[System.TimeSpan.From#5](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/fromhours.cpp#5)]
[!code-csharp[System.TimeSpan.From#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/fromhours.cs#5)]
[!code-vb[System.TimeSpan.From#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/fromhours.vb#5)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.PositiveInfinity" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.NegativeInfinity" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />.</exception>
<altmember cref="T:System.Double" />
<altmember cref="M:System.TimeSpan.FromTicks(System.Int64)" />
<altmember cref="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromSeconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromMinutes(System.Double)" />
<altmember cref="M:System.TimeSpan.FromDays(System.Double)" />
</Docs>
</Member>
<Member MemberName="FromMilliseconds">
<MemberSignature Language="C#" Value="public static TimeSpan FromMilliseconds (double value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromMilliseconds(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromMilliseconds (value As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromMilliseconds(double value);" />
<MemberSignature Language="F#" Value="static member FromMilliseconds : double -&gt; TimeSpan" Usage="System.TimeSpan.FromMilliseconds value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" />
</Parameters>
<Docs>
<param name="value">A number of milliseconds.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified number of milliseconds.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `value` parameter is converted to ticks, and that number of ticks is used to initialize the new <xref:System.TimeSpan>. Therefore, `value` will only be considered accurate to the nearest millisecond. Note that, because of the loss of precision of the <xref:System.Double> data type, this conversion can generate an <xref:System.OverflowException> for values that are near to but still in the range of either <xref:System.TimeSpan.MinValue> or <xref:System.TimeSpan.MaxValue>. For example, this causes an <xref:System.OverflowException> in the following attempt to instantiate a <xref:System.TimeSpan> object.
[!code-csharp[System.TimeSpan.FromMinutes#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/cs/System.TimeSpan.FromMinutes.cs#4)]
[!code-vb[System.TimeSpan.FromMinutes#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/vb/System.TimeSpan.FromMinutes.vb#4)]
## Examples
The following example creates several <xref:System.TimeSpan> objects by using the <xref:System.TimeSpan.FromMilliseconds%2A> method.
[!code-cpp[System.TimeSpan.From#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/frommillisec.cpp#2)]
[!code-csharp[System.TimeSpan.From#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/frommillisec.cs#2)]
[!code-vb[System.TimeSpan.From#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/frommillisec.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.PositiveInfinity" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.NegativeInfinity" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />.</exception>
<altmember cref="T:System.Double" />
<altmember cref="M:System.TimeSpan.FromTicks(System.Int64)" />
<altmember cref="M:System.TimeSpan.FromSeconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromMinutes(System.Double)" />
<altmember cref="M:System.TimeSpan.FromHours(System.Double)" />
<altmember cref="M:System.TimeSpan.FromDays(System.Double)" />
</Docs>
</Member>
<Member MemberName="FromMinutes">
<MemberSignature Language="C#" Value="public static TimeSpan FromMinutes (double value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromMinutes(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromMinutes(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromMinutes (value As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromMinutes(double value);" />
<MemberSignature Language="F#" Value="static member FromMinutes : double -&gt; TimeSpan" Usage="System.TimeSpan.FromMinutes value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" />
</Parameters>
<Docs>
<param name="value">A number of minutes, accurate to the nearest millisecond.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `value` parameter is converted to milliseconds, which is converted to ticks, and that number of ticks is used to initialize the new <xref:System.TimeSpan>. Therefore, `value` will only be considered accurate to the nearest millisecond. Note that, because of the loss of precision of the <xref:System.Double> data type, this conversion can generate an <xref:System.OverflowException> for values that are near to but still in the range of either <xref:System.TimeSpan.MinValue> or <xref:System.TimeSpan.MaxValue>. For example, this causes an <xref:System.OverflowException> in the following attempt to instantiate a <xref:System.TimeSpan> object.
[!code-csharp[System.TimeSpan.FromMinutes#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/cs/System.TimeSpan.FromMinutes.cs#1)]
[!code-vb[System.TimeSpan.FromMinutes#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/vb/System.TimeSpan.FromMinutes.vb#1)]
## Examples
The following example creates several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.FromMinutes%2A> method.
[!code-cpp[System.TimeSpan.From#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/fromminutes.cpp#4)]
[!code-csharp[System.TimeSpan.From#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/fromminutes.cs#4)]
[!code-vb[System.TimeSpan.From#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/fromminutes.vb#4)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.PositiveInfinity" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.NegativeInfinity" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />.</exception>
<altmember cref="T:System.Double" />
<altmember cref="M:System.TimeSpan.FromTicks(System.Int64)" />
<altmember cref="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromSeconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromHours(System.Double)" />
<altmember cref="M:System.TimeSpan.FromDays(System.Double)" />
</Docs>
</Member>
<Member MemberName="FromSeconds">
<MemberSignature Language="C#" Value="public static TimeSpan FromSeconds (double value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromSeconds(float64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromSeconds(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromSeconds (value As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromSeconds(double value);" />
<MemberSignature Language="F#" Value="static member FromSeconds : double -&gt; TimeSpan" Usage="System.TimeSpan.FromSeconds value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Double" />
</Parameters>
<Docs>
<param name="value">A number of seconds, accurate to the nearest millisecond.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `value` parameter is converted to milliseconds, which is converted to ticks, and that number of ticks is used to initialize the new <xref:System.TimeSpan>. Therefore, `value` will only be considered accurate to the nearest millisecond. Note that, because of the loss of precision of the <xref:System.Double> data type, this can generate an <xref:System.OverflowException> for values that are near but still in the range of either <xref:System.TimeSpan.MinValue> or <xref:System.TimeSpan.MaxValue>, This is the cause of an <xref:System.OverflowException>, for example, in the following attempt to instantiate a <xref:System.TimeSpan> object.
[!code-csharp[System.TimeSpan.FromMinutes#5](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/cs/System.TimeSpan.FromMinutes.cs#5)]
[!code-vb[System.TimeSpan.FromMinutes#5](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.FromMinutes/vb/System.TimeSpan.FromMinutes.vb#5)]
## Examples
The following example creates several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.FromSeconds%2A> method.
[!code-cpp[System.TimeSpan.From#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/fromseconds.cpp#3)]
[!code-csharp[System.TimeSpan.From#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/fromseconds.cs#3)]
[!code-vb[System.TimeSpan.From#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/fromseconds.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.PositiveInfinity" />.
-or-
<paramref name="value" /> is <see cref="F:System.Double.NegativeInfinity" />.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="value" /> is equal to <see cref="F:System.Double.NaN" />.</exception>
<altmember cref="T:System.Double" />
<altmember cref="M:System.TimeSpan.FromTicks(System.Int64)" />
<altmember cref="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromMinutes(System.Double)" />
<altmember cref="M:System.TimeSpan.FromHours(System.Double)" />
<altmember cref="M:System.TimeSpan.FromDays(System.Double)" />
</Docs>
</Member>
<Member MemberName="FromTicks">
<MemberSignature Language="C#" Value="public static TimeSpan FromTicks (long value);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan FromTicks(int64 value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.FromTicks(System.Int64)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromTicks (value As Long) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan FromTicks(long value);" />
<MemberSignature Language="F#" Value="static member FromTicks : int64 -&gt; TimeSpan" Usage="System.TimeSpan.FromTicks value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Int64" />
</Parameters>
<Docs>
<param name="value">A number of ticks that represent a time.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> that represents a specified time, where the specification is in units of ticks.</summary>
<returns>An object that represents <paramref name="value" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This is a convenience method with the same behavior as the <xref:System.TimeSpan.%23ctor%28System.Int64%29?displayProperty=nameWithType> constructor. A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond.
## Examples
The following example creates several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.FromTicks%2A> method.
[!code-cpp[System.TimeSpan.From#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.From/CPP/fromticks.cpp#1)]
[!code-csharp[System.TimeSpan.From#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.From/CS/fromticks.cs#1)]
[!code-vb[System.TimeSpan.From#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.From/VB/fromticks.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Int64" />
<altmember cref="M:System.TimeSpan.FromMilliseconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromSeconds(System.Double)" />
<altmember cref="M:System.TimeSpan.FromMinutes(System.Double)" />
<altmember cref="M:System.TimeSpan.FromHours(System.Double)" />
<altmember cref="M:System.TimeSpan.FromDays(System.Double)" />
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="timeSpan.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a hash code for this instance.</summary>
<returns>A 32-bit signed integer hash code.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Two <xref:System.TimeSpan> objects might have the same hash code even though they represent different time values.
## Examples
The following example generates the hash codes of several <xref:System.TimeSpan> objects using the <xref:System.TimeSpan.GetHashCode%2A> method.
[!code-cpp[System.TimeSpan.GetHashCode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.GetHashCode/CPP/hashcode.cpp#1)]
[!code-csharp[System.TimeSpan.GetHashCode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.GetHashCode/CS/hashcode.cs#1)]
[!code-vb[System.TimeSpan.GetHashCode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.GetHashCode/VB/hashcode.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Hours">
<MemberSignature Language="C#" Value="public int Hours { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Hours" />
<MemberSignature Language="DocId" Value="P:System.TimeSpan.Hours" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Hours As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Hours { int get(); };" />
<MemberSignature Language="F#" Value="member this.Hours : int" Usage="System.TimeSpan.Hours" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the hours component of the time interval represented by the current <see cref="T:System.TimeSpan" /> structure.</summary>
<value>The hour component of the current <see cref="T:System.TimeSpan" /> structure. The return value ranges from -23 through 23.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.TimeSpan> value can be represented as [*-*]*d*.*hh*:*mm*:*ss*.*ff*, where the optional minus sign indicates a negative time interval, the *d* component is days, *hh* is hours as measured on a 24-hour clock, *mm* is minutes, *ss* is seconds, and *ff* is fractions of a second. The value of the <xref:System.TimeSpan.Hours%2A> property is the hours component, *hh*.
The <xref:System.TimeSpan.Hours%2A> property represents whole hours, whereas the <xref:System.TimeSpan.TotalHours%2A> property represents whole and fractional hours.
## Examples
The following example creates several <xref:System.TimeSpan> objects and displays the <xref:System.TimeSpan.Hours%2A> property of each.
[!code-cpp[System.TimeSpan.Properties#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp#1)]
[!code-csharp[System.TimeSpan.Properties#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs#1)]
[!code-vb[System.TimeSpan.Properties#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.TimeSpan.TotalHours" />
<altmember cref="P:System.TimeSpan.Ticks" />
<altmember cref="P:System.TimeSpan.Milliseconds" />
<altmember cref="P:System.TimeSpan.Seconds" />
<altmember cref="P:System.TimeSpan.Minutes" />
<altmember cref="P:System.TimeSpan.Days" />
</Docs>
</Member>
<Member MemberName="MaxValue">
<MemberSignature Language="C#" Value="public static readonly TimeSpan MaxValue;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly valuetype System.TimeSpan MaxValue" />
<MemberSignature Language="DocId" Value="F:System.TimeSpan.MaxValue" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MaxValue As TimeSpan " />
<MemberSignature Language="C++ CLI" Value="public: static initonly TimeSpan MaxValue;" />
<MemberSignature Language="F#" Value=" staticval mutable MaxValue : TimeSpan" Usage="System.TimeSpan.MaxValue" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Represents the maximum <see cref="T:System.TimeSpan" /> value. This field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this field is equivalent to <xref:System.Int64.MaxValue?displayProperty=nameWithType> ticks. The string representation of this value is positive 10675199.02:48:05.4775807, or slightly more than 10,675,199 days.
## Examples
The following example references and displays the value of the <xref:System.TimeSpan.MaxValue> field.
[!code-cpp[System.TimeSpan.Fields#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CPP/fields.cpp#1)]
[!code-csharp[System.TimeSpan.Fields#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CS/fields.cs#1)]
[!code-vb[System.TimeSpan.Fields#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Fields/VB/fields.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Int64" />
<altmember cref="F:System.TimeSpan.MinValue" />
</Docs>
</Member>
<Member MemberName="Milliseconds">
<MemberSignature Language="C#" Value="public int Milliseconds { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Milliseconds" />
<MemberSignature Language="DocId" Value="P:System.TimeSpan.Milliseconds" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Milliseconds As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Milliseconds { int get(); };" />
<MemberSignature Language="F#" Value="member this.Milliseconds : int" Usage="System.TimeSpan.Milliseconds" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the milliseconds component of the time interval represented by the current <see cref="T:System.TimeSpan" /> structure.</summary>
<value>The millisecond component of the current <see cref="T:System.TimeSpan" /> structure. The return value ranges from -999 through 999.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.TimeSpan> value can be represented as [*-*]*d*.*hh*:*mm*:*ss*.*ff*, where the optional minus sign indicates a negative time interval, the *d* component is days, *hh* is hours as measured on a 24-hour clock, *mm* is minutes, *ss* is seconds, and *ff* is fractions of a second. The value of the <xref:System.TimeSpan.Milliseconds%2A> property is the fractional second component, *ff*.
The <xref:System.TimeSpan.Milliseconds%2A> property represents whole milliseconds, whereas the <xref:System.TimeSpan.TotalMilliseconds%2A> property represents whole and fractional milliseconds.
## Examples
The following example creates several <xref:System.TimeSpan> objects and displays the <xref:System.TimeSpan.Milliseconds%2A> property of each.
[!code-cpp[System.TimeSpan.Properties#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp#1)]
[!code-csharp[System.TimeSpan.Properties#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs#1)]
[!code-vb[System.TimeSpan.Properties#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.TimeSpan.TotalMilliseconds" />
<altmember cref="P:System.TimeSpan.Ticks" />
<altmember cref="P:System.TimeSpan.Seconds" />
<altmember cref="P:System.TimeSpan.Minutes" />
<altmember cref="P:System.TimeSpan.Hours" />
<altmember cref="P:System.TimeSpan.Days" />
</Docs>
</Member>
<Member MemberName="Minutes">
<MemberSignature Language="C#" Value="public int Minutes { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Minutes" />
<MemberSignature Language="DocId" Value="P:System.TimeSpan.Minutes" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Minutes As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Minutes { int get(); };" />
<MemberSignature Language="F#" Value="member this.Minutes : int" Usage="System.TimeSpan.Minutes" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the minutes component of the time interval represented by the current <see cref="T:System.TimeSpan" /> structure.</summary>
<value>The minute component of the current <see cref="T:System.TimeSpan" /> structure. The return value ranges from -59 through 59.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A <xref:System.TimeSpan> value can be represented as [*-*]*d*.*hh*:*mm*:*ss*.*ff*, where the optional minus sign indicates a negative time interval, the *d* component is days, *hh* is hours as measured on a 24-hour clock, *mm* is minutes, *ss* is seconds, and *ff* is fractions of a second. The value of the <xref:System.TimeSpan.Minutes%2A> property is the minute component, *mm*.
The <xref:System.TimeSpan.Minutes%2A> property represents whole minutes, whereas the <xref:System.TimeSpan.TotalMinutes%2A> property represents whole and fractional minutes.
## Examples
The following example creates several <xref:System.TimeSpan> objects and displays the <xref:System.TimeSpan.Minutes%2A> property of each.
[!code-cpp[System.TimeSpan.Properties#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CPP/properties.cpp#1)]
[!code-csharp[System.TimeSpan.Properties#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Properties/CS/properties.cs#1)]
[!code-vb[System.TimeSpan.Properties#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Properties/VB/properties.vb#1)]
]]></format>
</remarks>
<altmember cref="P:System.TimeSpan.TotalMinutes" />
<altmember cref="P:System.TimeSpan.Ticks" />
<altmember cref="P:System.TimeSpan.Milliseconds" />
<altmember cref="P:System.TimeSpan.Seconds" />
<altmember cref="P:System.TimeSpan.Hours" />
<altmember cref="P:System.TimeSpan.Days" />
</Docs>
</Member>
<Member MemberName="MinValue">
<MemberSignature Language="C#" Value="public static readonly TimeSpan MinValue;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly valuetype System.TimeSpan MinValue" />
<MemberSignature Language="DocId" Value="F:System.TimeSpan.MinValue" />
<MemberSignature Language="VB.NET" Value="Public Shared ReadOnly MinValue As TimeSpan " />
<MemberSignature Language="C++ CLI" Value="public: static initonly TimeSpan MinValue;" />
<MemberSignature Language="F#" Value=" staticval mutable MinValue : TimeSpan" Usage="System.TimeSpan.MinValue" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Docs>
<summary>Represents the minimum <see cref="T:System.TimeSpan" /> value. This field is read-only.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The value of this field is equivalent to <xref:System.Int64.MinValue?displayProperty=nameWithType> ticks. The string representation of this value is negative 10675199.02:48:05.4775808, or slightly more than negative 10,675,199 days.
## Examples
The following example references and displays the value of the <xref:System.TimeSpan.MinValue> field.
[!code-cpp[System.TimeSpan.Fields#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CPP/fields.cpp#1)]
[!code-csharp[System.TimeSpan.Fields#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Fields/CS/fields.cs#1)]
[!code-vb[System.TimeSpan.Fields#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Fields/VB/fields.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Int64" />
<altmember cref="F:System.TimeSpan.MaxValue" />
</Docs>
</Member>
<Member MemberName="Multiply">
<MemberSignature Language="C#" Value="public TimeSpan Multiply (double factor);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.TimeSpan Multiply(float64 factor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Multiply(System.Double)" />
<MemberSignature Language="VB.NET" Value="Public Function Multiply (factor As Double) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan Multiply(double factor);" />
<MemberSignature Language="F#" Value="member this.Multiply : double -&gt; TimeSpan" Usage="timeSpan.Multiply factor" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="factor" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="factor">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Negate">
<MemberSignature Language="C#" Value="public TimeSpan Negate ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.TimeSpan Negate() cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Negate" />
<MemberSignature Language="VB.NET" Value="Public Function Negate () As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; TimeSpan Negate();" />
<MemberSignature Language="F#" Value="member this.Negate : unit -&gt; TimeSpan" Usage="timeSpan.Negate " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a new <see cref="T:System.TimeSpan" /> object whose value is the negated value of this instance.</summary>
<returns>A new object with the same numeric value as this instance, but with the opposite sign.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example applies the <xref:System.TimeSpan.Negate%2A> method to several <xref:System.TimeSpan> objects.
[!code-cpp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CPP/dura_nega_una.cpp#1)]
[!code-csharp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CS/dura_nega_una.cs#1)]
[!code-vb[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/VB/dura_nega_una.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">The negated value of this instance cannot be represented by a <see cref="T:System.TimeSpan" />; that is, the value of this instance is <see cref="F:System.TimeSpan.MinValue" />.</exception>
</Docs>
</Member>
<Member MemberName="op_Addition">
<MemberSignature Language="C#" Value="public static TimeSpan operator + (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_Addition(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Addition(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator + (t1 As TimeSpan, t2 As TimeSpan) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator +(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( + ) : TimeSpan * TimeSpan -&gt; TimeSpan" Usage="t1 + t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to add.</param>
<param name="t2">The second time interval to add.</param>
<summary>Adds two specified <see cref="T:System.TimeSpan" /> instances.</summary>
<returns>An object whose value is the sum of the values of <paramref name="t1" /> and <paramref name="t2" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.TimeSpan.op_Addition%2A> method defines the addition operator for <xref:System.TimeSpan> values. It enables code such as the following:
[!code-csharp[System.TimeSpan.Operators#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.operators/cs/operators1.cs#1)]
[!code-vb[System.TimeSpan.Operators#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.operators/vb/operators1.vb#1)]
Languages that do not support custom operators can call the <xref:System.TimeSpan.Add%2A> method instead.
The equivalent method for this operator is <xref:System.TimeSpan.Add%28System.TimeSpan%29?displayProperty=nameWithType>]]></format>
</remarks>
<exception cref="T:System.OverflowException">The resulting <see cref="T:System.TimeSpan" /> is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
<altmember cref="M:System.TimeSpan.Add(System.TimeSpan)" />
</Docs>
</Member>
<Member MemberName="op_Division">
<MemberSignature Language="C#" Value="public static TimeSpan operator / (TimeSpan timeSpan, double divisor);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_Division(valuetype System.TimeSpan timeSpan, float64 divisor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Division(System.TimeSpan,System.Double)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator /(TimeSpan timeSpan, double divisor);" />
<MemberSignature Language="F#" Value="static member ( / ) : TimeSpan * double -&gt; TimeSpan" Usage="timeSpan / divisor" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="timeSpan" Type="System.TimeSpan" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
<Parameter Name="divisor" Type="System.Double" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="timeSpan">To be added.</param>
<param name="divisor">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Division">
<MemberSignature Language="C#" Value="public static double operator / (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname float64 op_Division(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Division(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator / (t1 As TimeSpan, t2 As TimeSpan) As Double" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static double operator /(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( / ) : TimeSpan * TimeSpan -&gt; double" Usage="t1 / t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Double</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
<Parameter Name="t2" Type="System.TimeSpan" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="t1">To be added.</param>
<param name="t2">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Equality">
<MemberSignature Language="C#" Value="public static bool operator == (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Equality(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Equality(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator == (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator ==(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( = ) : TimeSpan * TimeSpan -&gt; bool" Usage="t1 = t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether two <see cref="T:System.TimeSpan" /> instances are equal.</summary>
<returns>
<see langword="true" /> if the values of <paramref name="t1" /> and <paramref name="t2" /> are equal; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Equals%28System.Object%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_Equality%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Equals(System.Object)" />
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_GreaterThan">
<MemberSignature Language="C#" Value="public static bool operator &gt; (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_GreaterThan(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_GreaterThan(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator &gt; (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator &gt;(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( &gt; ) : TimeSpan * TimeSpan -&gt; bool" Usage="t1 &gt; t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether a specified <see cref="T:System.TimeSpan" /> is greater than another specified <see cref="T:System.TimeSpan" />.</summary>
<returns>
<see langword="true" /> if the value of <paramref name="t1" /> is greater than the value of <paramref name="t2" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Compare%28System.TimeSpan%2CSystem.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_GreaterThan%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_GreaterThanOrEqual">
<MemberSignature Language="C#" Value="public static bool operator &gt;= (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_GreaterThanOrEqual(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_GreaterThanOrEqual(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator &gt;= (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator &gt;=(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( &gt;= ) : TimeSpan * TimeSpan -&gt; bool" Usage="t1 &gt;= t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether a specified <see cref="T:System.TimeSpan" /> is greater than or equal to another specified <see cref="T:System.TimeSpan" />.</summary>
<returns>
<see langword="true" /> if the value of <paramref name="t1" /> is greater than or equal to the value of <paramref name="t2" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Compare%28System.TimeSpan%2CSystem.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_GreaterThanOrEqual%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_Inequality">
<MemberSignature Language="C#" Value="public static bool operator != (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_Inequality(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Inequality(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator != (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator !=(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member op_Inequality : TimeSpan * TimeSpan -&gt; bool" Usage="System.TimeSpan.op_Inequality (t1, t2)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether two <see cref="T:System.TimeSpan" /> instances are not equal.</summary>
<returns>
<see langword="true" /> if the values of <paramref name="t1" /> and <paramref name="t2" /> are not equal; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Compare%28System.TimeSpan%2CSystem.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_Inequality%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_LessThan">
<MemberSignature Language="C#" Value="public static bool operator &lt; (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_LessThan(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_LessThan(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator &lt; (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator &lt;(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( &lt; ) : TimeSpan * TimeSpan -&gt; bool" Usage="t1 &lt; t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether a specified <see cref="T:System.TimeSpan" /> is less than another specified <see cref="T:System.TimeSpan" />.</summary>
<returns>
<see langword="true" /> if the value of <paramref name="t1" /> is less than the value of <paramref name="t2" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Compare%28System.TimeSpan%2CSystem.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_LessThan%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_LessThanOrEqual">
<MemberSignature Language="C#" Value="public static bool operator &lt;= (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname bool op_LessThanOrEqual(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_LessThanOrEqual(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator &lt;= (t1 As TimeSpan, t2 As TimeSpan) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool operator &lt;=(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( &lt;= ) : TimeSpan * TimeSpan -&gt; bool" Usage="t1 &lt;= t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The first time interval to compare.</param>
<param name="t2">The second time interval to compare.</param>
<summary>Indicates whether a specified <see cref="T:System.TimeSpan" /> is less than or equal to another specified <see cref="T:System.TimeSpan" />.</summary>
<returns>
<see langword="true" /> if the value of <paramref name="t1" /> is less than or equal to the value of <paramref name="t2" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Compare%28System.TimeSpan%2CSystem.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example compares several <xref:System.TimeSpan> objects to a reference <xref:System.TimeSpan> using the <xref:System.TimeSpan.op_LessThanOrEqual%2A> operator.
[!code-cpp[System.TimeSpan.RelationalOps#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CPP/relationalops.cpp#1)]
[!code-csharp[System.TimeSpan.RelationalOps#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/CS/relationalops.cs#1)]
[!code-vb[System.TimeSpan.RelationalOps#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.RelationalOps/VB/relationalops.vb#1)]
]]></format>
</remarks>
<altmember cref="M:System.TimeSpan.Compare(System.TimeSpan,System.TimeSpan)" />
<altmember cref="M:System.TimeSpan.CompareTo(System.Object)" />
</Docs>
</Member>
<Member MemberName="op_Multiply">
<MemberSignature Language="C#" Value="public static TimeSpan operator * (double factor, TimeSpan timeSpan);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_Multiply(float64 factor, valuetype System.TimeSpan timeSpan) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Multiply(System.Double,System.TimeSpan)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator *(double factor, TimeSpan timeSpan);" />
<MemberSignature Language="F#" Value="static member ( * ) : double * TimeSpan -&gt; TimeSpan" Usage="factor * timeSpan" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="factor" Type="System.Double" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
<Parameter Name="timeSpan" Type="System.TimeSpan" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="factor">To be added.</param>
<param name="timeSpan">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Multiply">
<MemberSignature Language="C#" Value="public static TimeSpan operator * (TimeSpan timeSpan, double factor);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_Multiply(valuetype System.TimeSpan timeSpan, float64 factor) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Multiply(System.TimeSpan,System.Double)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator *(TimeSpan timeSpan, double factor);" />
<MemberSignature Language="F#" Value="static member ( * ) : TimeSpan * double -&gt; TimeSpan" Usage="timeSpan * factor" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="timeSpan" Type="System.TimeSpan" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
<Parameter Name="factor" Type="System.Double" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="timeSpan">To be added.</param>
<param name="factor">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="op_Subtraction">
<MemberSignature Language="C#" Value="public static TimeSpan operator - (TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_Subtraction(valuetype System.TimeSpan t1, valuetype System.TimeSpan t2) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_Subtraction(System.TimeSpan,System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator - (t1 As TimeSpan, t2 As TimeSpan) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator -(TimeSpan t1, TimeSpan t2);" />
<MemberSignature Language="F#" Value="static member ( - ) : TimeSpan * TimeSpan -&gt; TimeSpan" Usage="t1 - t2" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t1" Type="System.TimeSpan" />
<Parameter Name="t2" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t1">The minuend.</param>
<param name="t2">The subtrahend.</param>
<summary>Subtracts a specified <see cref="T:System.TimeSpan" /> from another specified <see cref="T:System.TimeSpan" />.</summary>
<returns>An object whose value is the result of the value of <paramref name="t1" /> minus the value of <paramref name="t2" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Subtract%28System.TimeSpan%29?displayProperty=nameWithType>
## Examples
The following example uses the <xref:System.TimeSpan> subtraction operator to calculate the total length of the weekly work day. It also uses the <xref:System.TimeSpan> addition operator to compute the total time of the daily breaks before using it in a subtraction operation to compute the total actual daily working time.
[!code-csharp[System.TimeSpan.Operators#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.operators/cs/Subtraction1.cs#2)]
[!code-vb[System.TimeSpan.Operators#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.operators/vb/Subtraction1.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">The return value is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.</exception>
</Docs>
</Member>
<Member MemberName="op_UnaryNegation">
<MemberSignature Language="C#" Value="public static TimeSpan operator - (TimeSpan t);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_UnaryNegation(valuetype System.TimeSpan t) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_UnaryNegation(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator - (t As TimeSpan) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator -(TimeSpan t);" />
<MemberSignature Language="F#" Value="static member ( ~- ) : TimeSpan -&gt; TimeSpan" Usage="- t" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t">The time interval to be negated.</param>
<summary>Returns a <see cref="T:System.TimeSpan" /> whose value is the negated value of the specified instance.</summary>
<returns>An object that has the same numeric value as this instance, but the opposite sign.</returns>
<remarks>
<format type="text/markdown"><![CDATA[The equivalent method for this operator is <xref:System.TimeSpan.Negate?displayProperty=nameWithType>
## Examples
The following example applies the <xref:System.TimeSpan.op_UnaryNegation%2A> operator to several <xref:System.TimeSpan> objects.
[!code-cpp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CPP/dura_nega_una.cpp#1)]
[!code-csharp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CS/dura_nega_una.cs#1)]
[!code-vb[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/VB/dura_nega_una.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.OverflowException">The negated value of this instance cannot be represented by a <see cref="T:System.TimeSpan" />; that is, the value of this instance is <see cref="F:System.TimeSpan.MinValue" />.</exception>
</Docs>
</Member>
<Member MemberName="op_UnaryPlus">
<MemberSignature Language="C#" Value="public static TimeSpan operator + (TimeSpan t);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig specialname valuetype System.TimeSpan op_UnaryPlus(valuetype System.TimeSpan t) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.op_UnaryPlus(System.TimeSpan)" />
<MemberSignature Language="VB.NET" Value="Public Shared Operator + (t As TimeSpan) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan operator +(TimeSpan t);" />
<MemberSignature Language="F#" Value="static member ( ~+ ) : TimeSpan -&gt; TimeSpan" Usage="+ t" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="t" Type="System.TimeSpan" />
</Parameters>
<Docs>
<param name="t">The time interval to return.</param>
<summary>Returns the specified instance of <see cref="T:System.TimeSpan" />.</summary>
<returns>The time interval specified by <paramref name="t" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following example applies the <xref:System.TimeSpan.op_UnaryPlus%2A> operator to several <xref:System.TimeSpan> objects.
[!code-cpp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CPP/dura_nega_una.cpp#1)]
[!code-csharp[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/CS/dura_nega_una.cs#1)]
[!code-vb[System.TimeSpan.Dura_Nega_Unary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.TimeSpan.Dura_Nega_Unary/VB/dura_nega_una.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Parse">
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Converts the string representation of a time interval to its <see cref="T:System.TimeSpan" /> equivalent.</summary>
<altmember cref="Overload:System.TimeSpan.TryParse" />
</Docs>
</MemberGroup>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public static TimeSpan Parse (string s);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan Parse(string s) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Parse(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Parse (s As String) As TimeSpan" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static TimeSpan Parse(System::String ^ s);" />
<MemberSignature Language="F#" Value="static member Parse : string -&gt; TimeSpan" Usage="System.TimeSpan.Parse s" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.0.20.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="s" Type="System.String" />
</Parameters>
<Docs>
<param name="s">A string that specifies the time interval to convert.</param>
<summary>Converts the string representation of a time interval to its <see cref="T:System.TimeSpan" /> equivalent.</summary>
<returns>A time interval that corresponds to <paramref name="s" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `s` parameter contains a time interval specification in the form:
[*ws*][-]{ *d* &#124; [*d*.]*hh*:*mm*[:*ss*[.*ff*]] }[*ws*]
Elements in square brackets ([ and ]) are optional. One selection from the list of alternatives enclosed in braces ({ and }) and separated by vertical bars (&#124;) is required. The following table describes each element.
|Element|Description|
|-------------|-----------------|
|*ws*|Optional white space.|
|-|An optional minus sign, which indicates a negative <xref:System.TimeSpan>.|
|*d*|Days, ranging from 0 to 10675199.|
|.|A culture-sensitive symbol that separates days from hours. The invariant format uses a period (".") character.|
|*hh*|Hours, ranging from 0 to 23.|
|:|The culture-sensitive time separator symbol. The invariant format uses a colon (":") character.|
|*mm*|Minutes, ranging from 0 to 59.|
|*ss*|Optional seconds, ranging from 0 to 59.|
|*.*|A culture-sensitive symbol that separates seconds from fractions of a second. The invariant format uses a period (".") character.|
|*ff*|Optional fractional seconds, consisting of one to seven decimal digits.|
If the `s` argument is not a day value only, it must include an hours and a minutes component; other components are optional. If they are present, the values of each time component must fall within a specified range. For example, the value of *hh*, the hours component, must be between 0 and 23. Because of this, passing "23:00:00" to the <xref:System.TimeSpan.Parse%2A> method returns a time interval of 23 hours. On the other hand, passing "24:00:00" returns a time interval of 24 days. Because "24" is outside the range of the hours component, it is interpreted as the days component.
The components of `s` must collectively specify a time interval that is greater than or equal to <xref:System.TimeSpan.MinValue?displayProperty=nameWithType> and less than or equal to <xref:System.TimeSpan.MaxValue?displayProperty=nameWithType>.
The <xref:System.TimeSpan.Parse%28System.String%29> method tries to parse `s` by using each of the culture-specific formats for the current culture.
## Notes to callers
When a time interval component in the string to be parsed contains more than seven digits, parsing operations in the .NET Framework 3.5 and earlier versions may behave differently from parsing operations in the .NET Framework 4 and later versions. In some cases, parsing operations that succeed in the .NET Framework 3.5 and earlier versions may fail and throw an <xref:System.OverflowException> in the .NET Framework 4 and later. In other cases, parsing operations that throw a <xref:System.FormatException> in the .NET Framework 3.5 and earlier versions may fail and throw an <xref:System.OverflowException> in the .NET Framework 4 and later. The following example illustrates both scenarios.
[!code-csharp[System.TimeSpan.Parse#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parsefailure1.cs#3)]
[!code-vb[System.TimeSpan.Parse#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parsefailure1.vb#3)]
## Examples
The following example uses the <xref:System.TimeSpan.Parse%2A> method to convert each element in a string array to a <xref:System.TimeSpan> value. It changes the current system culture to Croatian - Croatia ("hr-HR") and English - United States ("en-US") to illustrate how the current system culture affects the parsing operation.
[!code-csharp[System.TimeSpan.Parse#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.timespan.parse/cs/parse1.cs#1)]
[!code-vb[System.TimeSpan.Parse#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.timespan.parse/vb/parse1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="s" /> is <see langword="null" />.</exception>
<exception cref="T:System.FormatException">
<paramref name="s" /> has an invalid format.</exception>
<exception cref="T:System.OverflowException">
<paramref name="s" /> represents a number that is less than <see cref="F:System.TimeSpan.MinValue" /> or greater than <see cref="F:System.TimeSpan.MaxValue" />.
-or-
At least one of the days, hours, minutes, or seconds components is outside its valid range.</exception>
</Docs>
</Member>
<Member MemberName="Parse">
<MemberSignature Language="C#" Value="public static TimeSpan Parse (ReadOnlySpan&lt;char&gt; input, IFormatProvider formatProvider = null);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig valuetype System.TimeSpan Parse(valuetype System.ReadOnlySpan`1&lt;char&gt; input, class System.IFormatProvider formatProvider) cil managed" />
<MemberSignature Language="DocId" Value="M:System.TimeSpan.Parse(System.ReadOnlySpan{System.Char},System.IFormatProvider)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function Parse (input As ReadOnlySpan(Of Char), Optional formatProvider As IFormatProvider = null) As TimeSpan" />
<MemberSignature Language="F#" Value="static member Parse : ReadOnlySpan&lt;char&gt; * IFormatProvider -&gt; TimeSpan" Usage="System.TimeSpan.Parse (input, formatProvider)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Runtime</AssemblyName>
<AssemblyVersion>4.2.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.TimeSpan</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="input" Type="System.ReadOnlySpan&lt;System.Char&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
<Parameter Name="formatProvider" Type="System.IFormatProvider" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
</Parameters>
<Docs>
<param name="input">To be added.</param>
<param name="formatProvider">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>