c# - Convert hexadecimal string to an integer -



c# - Convert hexadecimal string to an integer -

int value = convert.toint32('o'); byte[] b = new byte[] { ( byte)value }; file.writeallbytes(default.projectspath , b);

when open file displays o, want write byte value file?

remove the0x convert:

int = convert.toint32("0xfe".substring(2), 16);

c# hex

Comments