I'm not sure that โ24:00:00โ will be the right time. Any, like, you do not need to indicate a date, you can do ...
DateTime time = DateTime.ParseExact("23:59:59", "HH:mm:ss", null);
If your time is actually the time of day, I would suggest sticking with DateTime. If you are actually using some amount of time (that is, it may be more than 23:59:59), you can use TimeSpan ...
TimeSpan time = TimeSpan.ParseExact("23:59:59", "HH:mm:ss", null);
do not forget that both have a version of TryParseExact if you are not sure that the input you entered will be valid.
musefan
source share