W
WRH
Hello
I am a C# newbie. I have an int that I want to convert to a fixed length
string
using leading zeros if necessary , ie int num = 0, string str =
num.ToString()
so that str is 0000 (eg, in C++ I would use str.Format("%4.4d",num)
Should be simple but I havent yet found out how to do it.
I am a C# newbie. I have an int that I want to convert to a fixed length
string
using leading zeros if necessary , ie int num = 0, string str =
num.ToString()
so that str is 0000 (eg, in C++ I would use str.Format("%4.4d",num)
Should be simple but I havent yet found out how to do it.