#region 分钟数转换成倒计时,格式 _天_时_分 + string MinutesToCountdown(int Minutes) /// <summary> /// 将分钟数转换成倒计时 格式:_天_时_分 /// </summary> /// <param name="Minutes">分钟数</param> /// <returns></returns> public static string MinutesToCountdown(int Minutes) { if (Minutes == 0) { return "0天0时0分"; } int day = 24 * 60; int hour = 60; int remainder = 0; int integer = 0; StringBuilder sb = new StringBuilder(); integer = Minutes / day; remainder = Minutes % day; sb.Append(integer + "天"); integer = remainder / hour; remainder = remainder % hour; sb.Append(integer + "时" + remainder + "分"); return sb.ToString(); } #endregion