C# Convert Hexadecimal to string -


I think I have a little problem because I am confusing my vocabulary on it.

Let me wrap a string in front of a vertical tab (variable) 11 or (four) 0x0b and one (variable) 28 or (variable) 0x1c end.

I do not understand the part of my illusion that what is the difference between 11 and 0x0b, I believe that there is an ascii and a hex, but I'm not positive so the compulsory form I need to do

  string response = (four) 0x0b + "message" + (variable) 0x1c;   

It does not seem to work though.

The part of my illusion I do not understand that the difference between 11 and 0x0b What is this.

There is no difference between the two representing the same mathematical number eleven, it has the base base ( 0x0B for base 16 and 11 < Code> for base 10).

C # provides an escape sequence for the vertical tab - \ v , so that you 'v' to (char) 0x0b You can write in place of . There is no escape sequence for 0x1C , but you can use a hexadecimal escape sequence to express it like \ x1C .

The modified code will look like this:

  string response = '\ v' + message + 'x1C';   

I removed double-quote around "message" , assuming that it represents a string variable that your code returns the feedback Prepared before

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -