I'm trying to convert the hexadecimal representation of a 64-bit number (e.g., the string "FFFFFFFFF"
) to binary representation ("11111..."
).
I've tried
string result = Convert.ToString(Convert.ToUInt64(value, 16), 2);
but this results in a confusing compiler error:
The best overloaded method match for 'System.Convert.ToString(object, System.IFormatProvider)' has some invalid arguments
Argument 2: cannot convert from 'int' to 'System.IFormatProvider'