fork download
  1. using System;
  2. using System.Linq;
  3. using System.Globalization;
  4.  
  5. public class Test
  6. {
  7.  
  8. public static void Main()
  9. {
  10. string partNumber = "abcdefghijklmopq";
  11. int whiteSpacesLength = 200 - partNumber.Length; // assuming partNumber is never > 200
  12. string whiteSpaces = new String(' ', whiteSpacesLength);
  13. string innerString = partNumber + whiteSpaces;
  14. Console.WriteLine("Result:");
  15. Console.WriteLine("{0}", innerString);
  16. Console.WriteLine("Length: {0}", innerString.Length);
  17. }
  18. }
Success #stdin #stdout 0.03s 33888KB
stdin
Standard input is empty
stdout
Result:
abcdefghijklmopq                                                                                                                                                                                        
Length: 200