Here is source code of the C# Program to Add Two TimeSpan .The C# program is successfully compiled and executed with Microsoft Visual Studio. The program output is also shown below.
* C# Program to Add Two TimeSpan
static void Main()
TimeSpan s1 = new TimeSpan(5, 0, 0);
TimeSpan s2 = new TimeSpan(2, 0, 0);
TimeSpan s3 = s1.Add(s2);
Here is the output of the C# Program:
Sanfoundry Global Education & Learning Series – 1000 C# Programs.