Add zero-padding to a string

You can use PadLeft

var newString = Your_String.PadLeft(4, '0');

Leave a Comment