Конвертировать из string в new byte[] { } — C#(Си шарп)

string s = "0xEB, 0x90";
byte[] byteArray = (from b in s.Split(new string[] { ", " }, StringSplitOptions.None) select Convert.ToByte(b, 16)).ToArray();

Leave a Comment