J
John Dann
Just wondering about the best way of assembling a string from a byte
array in VB.Net. I have a sequence of Ascii characters read into a
byte array from a binary file and need to reassemble these into their
original string.
I guess I could do something like:
for i as integer = 0 to ubound(byte())
string &= byte(i) (do I need a .tostring)
next
But maybe there's a more direct/approved/elegant method?
If it makes any difference, in this particular example, it's a
relatively short (16 byte string) that will probably only be used once
in the program so there's no great need for efficiency. But I'm asking
more out of interest in the principle as to the best approach.
TIA
John Dann
array in VB.Net. I have a sequence of Ascii characters read into a
byte array from a binary file and need to reassemble these into their
original string.
I guess I could do something like:
for i as integer = 0 to ubound(byte())
string &= byte(i) (do I need a .tostring)
next
But maybe there's a more direct/approved/elegant method?
If it makes any difference, in this particular example, it's a
relatively short (16 byte string) that will probably only be used once
in the program so there's no great need for efficiency. But I'm asking
more out of interest in the principle as to the best approach.
TIA
John Dann