Convert String to timeSpan in C#

Viewed 41

I'm reading from a txt file and saving it as string in an array. looks like this: K566666, 00:08:00

I need now to save this time in a TimeSpan to add another TimeSpan to it. How to reach that because i can not save a string into a TimeSpan

TimeSpan time = line[1];

Or is there other possibility to add calculate a TimeSpan to that what is inside the txt File.

the Parse function was not working or i don't know how to do it.

1 Answers
TimeSpan.Parse(line[1])

was what i was searching for.

Related