namespace System
{
[Serializable]
- public struct TimeSpan :
#if NET_2_0
- IComparable, IComparable<TimeSpan>
-#else
- IComparable
+ [System.Runtime.InteropServices.ComVisible (true)]
+#endif
+ public struct TimeSpan : IComparable
+#if NET_2_0
+ , IComparable<TimeSpan>, IEquatable <TimeSpan>
#endif
{
public static readonly TimeSpan MaxValue = new TimeSpan (long.MaxValue);
return p.Execute ();
}
+#if NET_2_0
+ public static bool TryParse (string s, out TimeSpan result)
+ {
+ try {
+ result = Parse (s);
+ return true;
+ } catch {
+ result = TimeSpan.Zero;
+ return false;
+ }
+ }
+#endif
+
public TimeSpan Subtract (TimeSpan ts)
{
try {