// Converts the value of the element to a hexadecimal representation. public static string ValueAsHex(this ScalarElement element) { byte[] value = element.GetValue(); string hex = BitConverter .ToString(value) .Replace("-", ""); return($"0x{hex}"); }
// Converts the value of the element to a hexadecimal representation. public static string ValueAsHex(this ScalarElement element) { return("0x" + BitConverter.ToString(element.GetValue()).Replace("-", "")); }