CSharp examples for System:DateTime Format
Pad number with zero
using System.Text; using System;/*from www.ja va 2 s .c o m*/ public class Main{ /// <summary> /// Pad number with zero /// </summary> /// <param name="number">Number to pad</param> /// <returns>Padded number</returns> private static string padZero(int number) { return (number > 9) ? "" + number : "0" + number; } }