Well my question is simple and straightforward.
Is there any way we can use hex values like in c++?
I am going to write binary files, but for that i will have to define certain characters like this for example.
\x00\x00\x11\x22\x33\x00\x00
I would first need to convert stuff like this to a byte array, and then write it to a binary text file.
Thanks!
No, that’s a problem with modern compilers, like VB.NET’s. There is no one-to-one mapping between bytes and strings anymore when Unicode became the preferred way of handling text. Codepoints like 0x80 don’t have a corresponding character, it is going to get munched when you convert the string to bytes.
You’ll need to work with a Byte() array in your code. The exact equivalent for your example is: