I have phone numbers like this :
452341
12
45789632
Is there a way i can format them like this way :
00452341
00000012
45789632
I have phone numbers like this :
452341
12
45789632
Is there a way i can format them like this way :
00452341
00000012
45789632
You cam use Padding:
Number.PadLeft(length, '0');
For example:
string num = "1234";
num.PadLeft(10, '0');
The result will be 0000001234
Use format with leading zeroes (Example for 8 symbols in number):
452341.ToString("D8");
if you have already strign use solution of Ashkan:
"452341".PadLeft(8, '0');