In C# I have an integer value which need to be convereted to string but it needs to add zeros before:
For Example:
int i = 1;
When
public static string ToLeadZeros(this int strNum, int num) { var str = strNum.ToString(); return str.PadLeft(str.Length + num, '0'); } // var i = 1; // string num = i.ToLeadZeros(5);