Suppose I have this string
string str = \"1234\"
I need a function that convert this string to this string:
\"0x31 0x32 0x33
[TestMethod] public void ToHex() { string str = "1234A"; var result = str.Select(s => string.Format("0x{0:X2}", ((byte)s))); foreach (var item in result) { Debug.WriteLine(item); } }