c# – How do I initialize a timespan with seconds – Education Career Blog

I have a variable(double) that holds a acumulation of seconds.

I would like to use timespan to format this into hours:min:seconds for display purposes, but I can’t seem to find how I would assign this acumulated value to a timespace.

C#
.net 2.0

,

Use the TimeSpan.FromSeconds method.

Leave a Comment