c# - converting string to uint -
i trying read in hex value text box , put in uint, code:
uint32 x = convert.touint32(location_txtbox.tostring());
why, want pass x unmanaged code , function header requires dword.
i'm getting 'input string not in correct format error? trying input values such 0x7c or 0x777 keep getting errors?
thanks.
use overload of convert.touint32 specify base of conversion. should work or without leading "0x".
uint32 x = convert.touint32(location_txtbox.text, 16);
Comments
Post a Comment