I have a customer number that is a string that varies in length. It can vary any where from 7 digits to 12 digits. When I am processing the data, I need the final string length to be 12 digits. I have tried (in c#) using string.PadRight(int, '0') and this does not work. All my searching online has indicated that this is the solution. Here is the sinipet of code that is failing.
int padCount = (12-invoiceFromDB.ArCustomerId.Length);
arCustomerId = invoiceFromDB.ArCustomerId.PadRight(padCount, '0');
So if I have a customer number of 123456, when the above code is executed, I end up with a customer number of 123456 instead of 123456000000.