<dd><ahref="../System/IComparable.html"title="interface in System">IComparable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>>, <ahref="../System/IEquatable.html"title="interface in System">IEquatable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>></dd>
</dl>
<hr>
<br>
<pre>public class <spanclass="strong">TimeSpan</span>
extends java.lang.Object
implements <ahref="../System/IComparable.html"title="interface in System">IComparable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>>, <ahref="../System/IEquatable.html"title="interface in System">IEquatable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>></pre>
<divclass="block">Represents a time interval.</div>
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Method and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#Add(System.TimeSpan)">Add</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> ts)</code>
<divclass="block">Adds the specified TimeSpan to this instance.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static int</code></td>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#Compare(System.TimeSpan, System.TimeSpan)">Compare</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t1,
<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t2)</code>
<divclass="block">Compares two TimeSpan values and returns an integer that indicates their relationship.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>int</code></td>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#CompareTo(System.TimeSpan)">CompareTo</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> value)</code>
<divclass="block">Compares this instance to a specified TimeSpan object and returns an indication of their relative values.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code><ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<divclass="block">Returns a value indicating whether this instance is equal to a specified object.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>boolean</code></td>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#Equals(System.TimeSpan)">Equals</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> obj)</code>
<divclass="block">Returns a value indicating whether this instance is equal to a specified TimeSpan object.</div>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#Equals(System.TimeSpan, System.TimeSpan)">Equals</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t1,
<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t2)</code>
<divclass="block">Returns a value indicating whether two specified instances of TimeSpan are equal.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<divclass="block">Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<divclass="block">Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code>static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<divclass="block">Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<divclass="block">Constructs a new TimeSpan object from a time interval specified in a string.</div>
</td>
</tr>
<trclass="rowColor">
<tdclass="colFirst"><code><ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a></code></td>
<tdclass="colLast"><code><strong><ahref="../System/TimeSpan.html#Subtract(System.TimeSpan)">Subtract</a></strong>(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> ts)</code>
<divclass="block">Subtracts the specified TimeSpan from this instance.</div>
<divclass="block">Represents the number of ticks in 1 millisecond. This field is constant.</div>
<dl><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../constant-values.html#System.TimeSpan.TicksPerMillisecond">Constant Field Values</a></dd></dl>
<divclass="block">Represents the number of ticks in 1 second.</div>
<dl><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../constant-values.html#System.TimeSpan.TicksPerSecond">Constant Field Values</a></dd></dl>
<divclass="block">Represents the number of ticks in 1 minute. This field is constant.</div>
<dl><dt><spanclass="strong">See Also:</span></dt><dd><ahref="../constant-values.html#System.TimeSpan.TicksPerMinute">Constant Field Values</a></dd></dl>
<divclass="block">Initializes a new TimeSpan to the specified number of ticks.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>ticks</code> - A time period expressed in 100-nanosecond units.</dd></dl>
</li>
</ul>
<aname="TimeSpan(int, int, int)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>TimeSpan</h4>
<pre>public TimeSpan(int hours,
int minutes,
int seconds)</pre>
<divclass="block">Initializes a new TimeSpan to a specified number of hours, minutes, and seconds.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>hours</code> - Number of hours.</dd><dd><code>minutes</code> - Number of minutes.</dd><dd><code>seconds</code> - Number of seconds.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentOutOfRangeException.html"title="class in System">ArgumentOutOfRangeException</a></code> - The parameters specify a TimeSpan value less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="TimeSpan(int, int, int, int)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>TimeSpan</h4>
<pre>public TimeSpan(int days,
int hours,
int minutes,
int seconds)</pre>
<divclass="block">Initializes a new TimeSpan to a specified number of days, hours, minutes, and seconds.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>days</code> - Number of days.</dd><dd><code>hours</code> - Number of hours.</dd><dd><code>minutes</code> - Number of minutes.</dd><dd><code>seconds</code> - Number of seconds.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentOutOfRangeException.html"title="class in System">ArgumentOutOfRangeException</a></code> - The parameters specify a TimeSpan value less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="TimeSpan(int, int, int, int, int)">
<!---->
</a>
<ulclass="blockListLast">
<liclass="blockList">
<h4>TimeSpan</h4>
<pre>public TimeSpan(int days,
int hours,
int minutes,
int seconds,
int milliseconds)</pre>
<divclass="block">Initializes a new TimeSpan to a specified number of days, hours, minutes, seconds, and milliseconds.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>days</code> - Number of days.</dd><dd><code>hours</code> - Number of hours.</dd><dd><code>minutes</code> - Number of minutes.</dd><dd><code>seconds</code> - Number of seconds.</dd><dd><code>milliseconds</code> - Number of milliseconds.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentOutOfRangeException.html"title="class in System">ArgumentOutOfRangeException</a></code> - The parameters specify a TimeSpan value less than MinValue or greater than MaxValue.</dd></dl>
<divclass="block">Gets the number of whole days represented by the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The day component of this instance. The return value can be positive or negative.</dd></dl>
</li>
</ul>
<aname="getHours()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getHours</h4>
<pre>public int getHours()</pre>
<divclass="block">Gets the number of whole hours represented by the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The hour component of the current TimeSpan structure. The return value ranges from -23 through 23.</dd></dl>
</li>
</ul>
<aname="getMilliseconds()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getMilliseconds</h4>
<pre>public int getMilliseconds()</pre>
<divclass="block">Gets the number of whole milliseconds represented by the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The millisecond component of the current TimeSpan structure. The return value ranges from -999 through 999.</dd></dl>
</li>
</ul>
<aname="getMinutes()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getMinutes</h4>
<pre>public int getMinutes()</pre>
<divclass="block">Gets the number of whole minutes represented by the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The minute component of the current TimeSpan structure. The return value ranges from -59 through 59.</dd></dl>
</li>
</ul>
<aname="getSeconds()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getSeconds</h4>
<pre>public int getSeconds()</pre>
<divclass="block">Gets the number of whole seconds represented by the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The second component of the current TimeSpan structure. The return value ranges from -59 through 59.</dd></dl>
</li>
</ul>
<aname="getTicks()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getTicks</h4>
<pre>public long getTicks()</pre>
<divclass="block">Gets the number of ticks that represent the value of the current TimeSpan structure.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The number of ticks contained in this instance.</dd></dl>
</li>
</ul>
<aname="getTotalDays()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>getTotalDays</h4>
<pre>public double getTotalDays()</pre>
<divclass="block">Gets the value of the current TimeSpan structure expressed in whole and fractional days.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The total number of days represented by this instance.</dd></dl>
<divclass="block">Gets the value of the current TimeSpan structure expressed in whole and fractional seconds.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The total number of seconds represented by this instance.</dd></dl>
</li>
</ul>
<aname="Add(System.TimeSpan)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Add</h4>
<pre>public <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> Add(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> ts)</pre>
<divclass="block">Adds the specified TimeSpan to this instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>ts</code> - A TimeSpan.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents the value of this instance plus the value of ts.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - The resulting TimeSpan is less than MinValue or greater than MaxValue.</dd></dl>
<pre>public static int Compare(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t1,
<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t2)</pre>
<divclass="block">Compares two TimeSpan values and returns an integer that indicates their relationship.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>t1</code> - A TimeSpan.</dd><dd><code>t2</code> - A TimeSpan.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>Value Condition -1 t1 is less than t20 t1 is equal to t21 t1 is greater than t2</dd></dl>
</li>
</ul>
<aname="CompareTo(System.TimeSpan)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>CompareTo</h4>
<pre>public int CompareTo(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> value)</pre>
<divclass="block">Compares this instance to a specified TimeSpan object and returns an indication of their relative values.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><ahref="../System/IComparable.html#CompareTo(T)">CompareTo</a></code> in interface <code><ahref="../System/IComparable.html"title="interface in System">IComparable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>></code></dd>
<dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A TimeSpan object to compare to this instance.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A signed number indicating the relative values of this instance and value.Value Description A negative integer This instance is less than value. Zero This instance is equal to value. A positive integer This instance is greater than value.</dd></dl>
</li>
</ul>
<aname="Duration()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Duration</h4>
<pre>public <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> Duration()</pre>
<divclass="block">Returns a new TimeSpan object whose value is the absolute value of the current TimeSpan object.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>A new TimeSpan whose value is the absolute value of the current TimeSpan object.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - The value of this instance is MinValue.</dd></dl>
<dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - An object to compare with this instance.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>true if value is a TimeSpan object that represents the same time interval as the current TimeSpan structure; otherwise, false.</dd></dl>
</li>
</ul>
<aname="Equals(System.TimeSpan)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Equals</h4>
<pre>public boolean Equals(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> obj)</pre>
<divclass="block">Returns a value indicating whether this instance is equal to a specified TimeSpan object.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><ahref="../System/IEquatable.html#Equals(T)">Equals</a></code> in interface <code><ahref="../System/IEquatable.html"title="interface in System">IEquatable</a><<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a>></code></dd>
<dt><spanclass="strong">Parameters:</span></dt><dd><code>obj</code> - An TimeSpan object to compare with this instance.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>true if obj represents the same time interval as this instance; otherwise, false.</dd></dl>
<pre>public static boolean Equals(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t1,
<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> t2)</pre>
<divclass="block">Returns a value indicating whether two specified instances of TimeSpan are equal.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>t1</code> - A TimeSpan.</dd><dd><code>t2</code> - A TimeSpan.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>true if the values of t1 and t2 are equal; otherwise, false.</dd></dl>
</li>
</ul>
<aname="FromDays(double)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromDays</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromDays(double value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of days, accurate to the nearest millisecond.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents value.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentException.html"title="class in System">ArgumentException</a></code> - value is equal to NaN.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - value is less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="FromHours(double)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromHours</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromHours(double value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of hours accurate to the nearest millisecond.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents value.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentException.html"title="class in System">ArgumentException</a></code> - value is equal to NaN.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - value is less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="FromMilliseconds(double)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromMilliseconds</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromMilliseconds(double value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified number of milliseconds.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of milliseconds.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents value.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentException.html"title="class in System">ArgumentException</a></code> - value is equal to NaN.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - value is less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="FromMinutes(double)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromMinutes</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromMinutes(double value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of minutes, accurate to the nearest millisecond.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents value.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentException.html"title="class in System">ArgumentException</a></code> - value is equal to NaN.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - value is less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="FromSeconds(double)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromSeconds</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromSeconds(double value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of seconds, accurate to the nearest millisecond.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that represents value.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/ArgumentException.html"title="class in System">ArgumentException</a></code> - value is equal to NaN.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - value is less than MinValue or greater than MaxValue.</dd></dl>
</li>
</ul>
<aname="FromTicks(long)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>FromTicks</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> FromTicks(long value)</pre>
<divclass="block">Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>value</code> - A number of ticks that represent a time.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan with a value of value.</dd></dl>
</li>
</ul>
<aname="hashCode()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<divclass="block">Returns a hash code for this instance.</div>
<dt><spanclass="strong">Returns:</span></dt><dd>A 32-bit signed integer hash code.</dd></dl>
</li>
</ul>
<aname="Negate()">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Negate</h4>
<pre>public <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> Negate()</pre>
<divclass="block">Returns a TimeSpan whose value is the negated value of this instance.</div>
<dl><dt><spanclass="strong">Returns:</span></dt><dd>The same numeric value as this instance, but with the opposite sign.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - The negated value of this instance cannot be represented by a TimeSpan; that is, the value of this instance is MinValue.</dd></dl>
</li>
</ul>
<aname="Parse(java.lang.String)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Parse</h4>
<pre>public static <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> Parse(java.lang.String s)</pre>
<divclass="block">Constructs a new TimeSpan object from a time interval specified in a string.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>s</code> - A string that specifies a time interval.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan that corresponds to s.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/FormatException.html"title="class in System">FormatException</a></code> - s has an invalid format.</dd>
<dd><code><ahref="../System/ArgumentNullException.html"title="class in System">ArgumentNullException</a></code> - s is null.</dd>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - s represents a number less than MinValue or greater than MaxValue.-or- At least one of the days, hours, minutes, or seconds components is outside its valid range.</dd></dl>
</li>
</ul>
<aname="Subtract(System.TimeSpan)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>Subtract</h4>
<pre>public <ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> Subtract(<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> ts)</pre>
<divclass="block">Subtracts the specified TimeSpan from this instance.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>ts</code> - A TimeSpan.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>A TimeSpan whose value is the result of the value of this instance minus the value of ts.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../System/OverflowException.html"title="class in System">OverflowException</a></code> - The return value is less than MinValue or greater than MaxValue.</dd></dl>
<dt><spanclass="strong">Returns:</span></dt><dd>A string that represents the value of this instance. The return value is of the form: [-][d.]hh:mm:ss[.ff] Items in square brackets ([ and ]) are optional, colons and periods (: and.) are literal characters; and the other items are as follows.Item Description "-" optional minus sign indicating a negative time "d" optional days "hh" hours, ranging from 0 to 23 "mm" minutes, ranging from 0 to 59 "ss" seconds, ranging from 0 to 59 "ff" optional fractional seconds, from 1 to 7 decimal digits For more information about comparing the string representation of TimeSpan and Oracle data types, see article Q324577, "System.TimeSpan Does Not Match Oracle 9i INTERVAL DAY TO SECOND Data Type," in the Microsoft Knowledge Base at http://support.microsoft.com.</dd></dl>
<ahref="../System/TimeSpan.html"title="class in System">TimeSpan</a> result)</pre>
<divclass="block">Constructs a new TimeSpan object from a time interval specified in a string. Parameters specify the time interval and the variable where the new TimeSpan object is returned.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>s</code> - A string that specifies a time interval.</dd><dd><code>result</code> - When this method returns, contains an object that represents the time interval specified by s, or Zero if the conversion failed. This parameter is passed uninitialized.</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>true if s was converted successfully; otherwise, false. This operation returns false if the s parameter is null, has an invalid format,represents a time interval less than MinValue or greater than MaxValue, or has at least one days, hours, minutes, or seconds component outside its valid range.</dd></dl>