G
Guest
I have a fairly irritating problem. I have a class with a range of public
properties, one of which being 'CustomerAccountNumber' which is a string
type. At one point in my application I need this customer account number in
the format 'CAXXXXX XXXXX'. Now, I've tried a number of formatting options
including approaches like :
String.Format(object.CustomerAccountNumber,"CA##### #####");
Convert.ToInt64(object.CustomerAccountNumber).ToString("CA##### #####");
String.Format(object.CustomerAccountNumber,"{0:CA##### #####}");
But no matter what I do, the leading zero's get truncated. Am I missing
something obvious here?
Many thanks for any help you can offer.
properties, one of which being 'CustomerAccountNumber' which is a string
type. At one point in my application I need this customer account number in
the format 'CAXXXXX XXXXX'. Now, I've tried a number of formatting options
including approaches like :
String.Format(object.CustomerAccountNumber,"CA##### #####");
Convert.ToInt64(object.CustomerAccountNumber).ToString("CA##### #####");
String.Format(object.CustomerAccountNumber,"{0:CA##### #####}");
But no matter what I do, the leading zero's get truncated. Am I missing
something obvious here?
Many thanks for any help you can offer.