BF2Statistics.ByteExtensions.ToHex C# (CSharp) Method

ToHex() public static method

Converts the byte array to its Hex string equivlent
public static ToHex ( this bytes, bool upperCase = true ) : string
bytes this
upperCase bool Do we uppercase the hex string?
return string
        public static string ToHex(this byte[] bytes, bool upperCase = true)
        {
            StringBuilder result = new StringBuilder(bytes.Length * 2);
            for (int i = 0; i < bytes.Length; i++)
                result.Append(bytes[i].ToString(upperCase ? "X2" : "x2"));

            return result.ToString();
        }
ByteExtensions