fork(20) download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. string str = "1234";
  8. char[] array = str.ToCharArray();
  9. string final = "";
  10. foreach (var i in array)
  11. {
  12. string hex = String.Format("{0:X}", Convert.ToInt32(i));
  13. final += hex.Insert(0, "0X") + " ";
  14. }
  15. final = final.TrimEnd();
  16. Console.WriteLine(final);
  17.  
  18. }
  19. }
Success #stdin #stdout 0.04s 33936KB
stdin
Standard input is empty
stdout
0X31 0X32 0X33 0X34