TimeSpan 是结构类型(struct),即值类型,可以通过两个DateTime(struct)之差来获得,如下例子:

 

 

DateTime departure = new DateTime(2010, 6, 12, 18, 32, 0);//DateTime
DateTime arrival = new DateTime(2010, 6, 13, 22, 47, 0);//DateTime
TimeSpan travelTime = arrival - departure; //TimeSpan的值可以通过两个DateTime之差获得