C# - Convert to string the significant part from a hex/ulong value -
how can take string significant part of hex/ulong number?
for example, if have 0x00000321321, want "321321".
if try like:
ulong x = 0x0000023632763; string s = x.tostring(); i 593700707, not want.
is possible ?
thank you!
use tostring(string format) override standard hexadecimal formatting "x" , along :trimstart() rid of leading zeros
string s = x.tostring("x"); (thanks keith n. pointing out trim not necessary.)
Comments
Post a Comment