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

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -