Skip to content

Instantly share code, notes, and snippets.

@serkanince
Created June 29, 2018 14:27
Show Gist options
  • Save serkanince/5378c388bccbcb75e917a0c4b88dfdaa to your computer and use it in GitHub Desktop.
Save serkanince/5378c388bccbcb75e917a0c4b88dfdaa to your computer and use it in GitHub Desktop.
byte string (hexa string) to byte[] convert
var result = Enumerable.Range(0, str.Length / 2).Select(x => Convert.ToByte(str.Substring(x * 2, 2), 16)).ToArray();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment