c# - Coverting INT to decimal following mm.ss format -


i may being stupid here, brain's gone blank.

i've got slider bar (which uses int32 values) want use select position in music song (mm.ss)

i want output value slider displaying in label above it, it's easier see slider set to.

anyone have suggestions?

i thought of trying convert int value in decimal dividing 60.

i'm doing in c# way.

what int value represent? if it's number of seconds through song, should use:

timespan time = timespan.fromseconds(seconds); string text = time.tostring(@"mm\.ss"); 

using decimal bad idea - format number of seconds isn't same fractional number of minutes. example, 10.50 minutes as fractional number of minutes 10 minutes , 30 seconds, not 10 minutes , 50 seconds, want far can tell.

timespan natural way of representing time duration in .net... why that's type supports formatting in minutes , seconds.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -