Skip to content

Instantly share code, notes, and snippets.

@aal89
Created July 30, 2019 22:35
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aal89/150c2af2f9dfd38dafaba4ac55317366 to your computer and use it in GitHub Desktop.
Save aal89/150c2af2f9dfd38dafaba4ac55317366 to your computer and use it in GitHub Desktop.
Print byte array in c#
public void PrintByteArray(byte[] bytes)
{
var sb = new StringBuilder("new byte[] { ");
foreach (var b in bytes)
{
sb.Append(b + ", ");
}
sb.Append("}");
Console.WriteLine(sb.ToString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment