Timer returning unwanted formatting [duplicate]
问题 This question already has answers here : Convert int (number) to string with leading zeros? (4 digits) [duplicate] (4 answers) Closed 6 days ago . I created a timer that returns the decreasing time: public static void timerIdle_Tick(object sender, EventArgs e) { if (tempo >= 60) { minuto = tempo / 60; segundo = tempo % 60; } else { minuto = 0; segundo = tempo; } segundo--; if (minuto > 0) { if (segundo < 0) { segundo = 59; minuto--; } } if (minuto == 0 && segundo == 0) { timerIdle.Stop();