Responder Developer Guide
TimeSpanAsString Class
Members 


Product Availability
Required Licenses
.NET Assembly
Represents a TimeSpan (duration) as a string value
Object Model
TimeSpanAsString Class
Syntax
'Declaration
 
Public Class TimeSpanAsString 
'Usage
 
Dim instance As TimeSpanAsString
public class TimeSpanAsString 
Remarks
The primary purpose of this TimeSpan parsing class is to provide more reasonable and logical behavior when parsing a string. Unfortunately, TimeSpan.Parse expects values to be within the exact range for hours (0-23), minutes (0-59), and seconds (0-59) and failure to do so results in odd behavior. For example: 24:00 is not treated as 24 hours (because it is not in the valid range of hours), and instead of throwing an exception, it treats it like 24 days. What?!? This class acts more like microwave time. That is, if you say 90 minutes, it knows that means 1 hour + 30 minutes. It still uses the (arguably non-standard) TimeSpan string syntax for compatibility with the TimeSpan.Parse method. For the most part, this class attempts to be compatible (a drop-in replacement) for TimeSpan.Parse(string). It maintains the contract of throwing appropriate exceptions for null, empty, or unparseable strings.
Inheritance Hierarchy

System.Object
   Miner.Responder.WindowsService.Settings.TimeSpanAsString

Requirements

Target Platforms: Windows XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

TimeSpanAsString Members
Miner.Responder.WindowsService.Settings Namespace

 

 


Send Comment