- Sep 8, 2004
- 1,495
- 0
- 0
i have a byte array as:
array<System::Byte> ^buf = gcnew array<System::Byte>(8);
Now i would like to know is there anyway to to turn all the 8 bytes into a string without using a for/loop? Is the an array function built in?
for example if:
buf[0] = 0xFF;
buf[1] = 0xAA;
buf[2] = 0xAA;
buf[3] = 0xAA;
buf[4] = 0xAA;
buf[5] = 0xAA;
buf[6] = 0xAA;
buf[7] = 0xFF;
and i want to do something like this
if ((buf.ToString("X") = "FFAAAAAAAAAAAAFF" )
// do something
else
// do something else
right now i am concatenated the bytes one by one with buf.ToString("X")
thanks
array<System::Byte> ^buf = gcnew array<System::Byte>(8);
Now i would like to know is there anyway to to turn all the 8 bytes into a string without using a for/loop? Is the an array function built in?
for example if:
buf[0] = 0xFF;
buf[1] = 0xAA;
buf[2] = 0xAA;
buf[3] = 0xAA;
buf[4] = 0xAA;
buf[5] = 0xAA;
buf[6] = 0xAA;
buf[7] = 0xFF;
and i want to do something like this
if ((buf.ToString("X") = "FFAAAAAAAAAAAAFF" )
// do something
else
// do something else
right now i am concatenated the bytes one by one with buf.ToString("X")
thanks