Created
July 30, 2019 22:35
-
-
Save aal89/150c2af2f9dfd38dafaba4ac55317366 to your computer and use it in GitHub Desktop.
Print byte array in c#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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