anyone?
Printable View
anyone?
Well first the integer has to goto a class, and learn about being an array of bytes. Should it choose to convert, it will need to attend a series of additional classes. Having passed all of the classes, one final step must be performed. In an act of true faith it must then surrender all its worldy goods and become a member of its new caste. But the sacrifice must be voluntary and complete. Then and only then shall it find true harmony and peace as an array of bytes....
:D Sorry nema-- it's been one of those kinds of days.
does CByte() exist? That's the only thing I can think of off the top of my head....
Lol, thats ok Techgnome, enjoyed the creativity....
I found my answer... it calls itself the BitConverter class.... and transforms any basetype into an array of bytes...
shaweet! You got a link to that? I coulda used it a while back.... I'll have to add it to my bag o' trix.
Its in the framework...
Dim G as BitConverter
although I still haven't figured out how to assign the bytes from the BitConverter to another byte array...VB Code:
Dim r As Integer = 32 Dim c As Byte() Dim g As BitConverter g.GetBytes(r) r = 0 r = g.ToInt32(c, 0) MsgBox(r.ToString)
NEvermind, got it resolved now:
VB Code:
Dim r As Integer = 32 Dim g As BitConverter Dim c() As Byte c = g.GetBytes(r) r = 0 r = g.ToInt32(c, 0) MsgBox(r.ToString)