Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# int to string

int myNumber = 010;
string myString = myNumber.ToString("D3");
Console.Write(myString);

/* D represents 'Decimal', and 3 is the specified amount of digits you want
   the number to always be. This will pad your value with zeroes until it 
   reaches 5 digits.*/
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #int #string
ADD COMMENT
Topic
Name
9+4 =