I have a field1 that should not be more than 7 characters. The remaining characters in field1 should be filled with leading zeros.
If field1 is 1 then it should be converted to 0000001.
If field1 is 21 then it should be converted to 0000021.
How do i do this in C#. Please help.
If you have a number and you want a string representation of 7 digits, pretty simple.
Say you have any particular string and you want to pad it to 7 characters, and those characters happen to be same character, you can do that, too.