I'm using the following code in a Class.
public Int16 Endereco = 0x7302;
byte[] Data = BitConverter.GetBytes(Endereco);
Array.Reverse(Data);
[...]
I would like to receive the value for the Endereco
variable of a String
, which will be obtained by reading a web form. How could I get the string and convert the same number to hexadecimal, for example:
String entrada = "7302";
Convert to Address as 0x7302, or
String entrada = "1A3B"
Convert to address as 0x1A3B.