Can we type strings with use of hex codes in c# like we type integers like that int a = 0x0000cd54;?

-5

I think this is kind of unusual thing to ask, but I need this. Well, I know I can do this:

string str = "45 AC 1B 5C";

And then convert it into something meaningful, but what if I don't want to bother with conversion and want to set string somehow like that: "0x00000045 0x000000AC 0x0000001B 0x0000005C" and then it automatically becomes common characters?

Is there any way?

c#
.net
string
hex
asked on Stack Overflow Dec 5, 2014 by Kosmo零

1 Answer

1

User contributions licensed under CC BY-SA 3.0