var str="9885" char pad = 'X'; Console.WriteLine(str.PadRight(10, "X")); it will display 9885XXXXXX
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)