Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

translate int to string with x 0 before c#

using System;
					
public class Program
{
	public static void Main()
	{
		int num = 50;
		string paddedNum = num.ToString().PadLeft(5, '0');
		
		Console.WriteLine(paddedNum);
	}
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #translate #int #string
ADD COMMENT
Topic
Name
9+3 =