The following code throws a System.Format exception, it
seems like XmlConvert cannot correctly handle TimeSpan
objects. I guess I could use TimeSpan.Ticks but it makes
for ugly XML. Is there a better way?

Thanks,
Pat.

using System;
using System.Xml;

namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
/// <summary>
/// The main entry point for the
application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
TimeSpan foo = new TimeSpan(12345);
string bar = XmlConvert.ToString
(foo);
TimeSpan back =
XmlConvert.ToTimeSpan(bar);
}
}
}