Core/CafeLib.Core/Support/ObjectId.cs
/// <summary>
/// Converts a byte array to a hex string.
/// </summary>
/// <param name="bytes">The byte array.</param>
/// <returns>A hex string.</returns>
Converts a byte array to a hex string.
Converts a byte array to a hex string .
public static string ToHexString(byte[] bytes)
        {
            if (bytes == null)
            {
                throw new ArgumentNullException(nameof(bytes));
            }
            var sb = new StringBuilder(bytes.Length * 2);
            foreach (var b in bytes)
            {
                sb.AppendFormat("{0:x2}", b);
            }
            return sb.ToString();
        }
public static string ToHexString ( byte [ ] bytes ) { if ( bytes == null ) { throw new ArgumentNullException ( nameof ( bytes ) ) ; } var sb = new StringBuilder ( bytes . Length * 2 ) ; foreach ( var b in bytes ) { sb . AppendFormat ( " " , b ) ; } return sb . ToString ( ) ; }
Converts a byte array to a hex string.
Converts a byte array to a hex string .
A hex string.
A hex string .
bytes
byte[]
The byte array.
The byte array .