System.Xml.XmlConvert.TryToTimeSpan C# (CSharp) Method

TryToTimeSpan() static private method

static private TryToTimeSpan ( string s, System.TimeSpan &result ) : Exception
s string
result System.TimeSpan
return System.Exception
        internal static Exception TryToTimeSpan(string s, out TimeSpan result)
        {
            XsdDuration duration;
            Exception exception;

            exception = XsdDuration.TryParse(s, out duration);
            if (exception != null)
            {
                result = TimeSpan.MinValue;
                return exception;
            }
            else
            {
                return duration.TryToTimeSpan(out result);
            }
        }