devxlogo

June 27, 2019

Use BitConverter Class to Convert a Byte Array

BitConverter’s ToString?method can be used to convert a byte array to a string. See below for an example: byte[] byteArray = ?string convertedString = BitConverter.ToString(byteArray).Replace(“-“,””);