|
-
May 8th, 2003, 01:41 PM
#1
Thread Starter
I wonder how many charact
How to convert an integer into array of bytes?{RESOLVED}
Last edited by nemaroller; May 8th, 2003 at 02:14 PM.
-
May 8th, 2003, 01:51 PM
#2
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....
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....
-
May 8th, 2003, 01:54 PM
#3
Thread Starter
I wonder how many charact
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...
-
May 8th, 2003, 02:00 PM
#4
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.
-
May 8th, 2003, 02:02 PM
#5
Thread Starter
I wonder how many charact
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)
-
May 8th, 2003, 02:05 PM
#6
Thread Starter
I wonder how many charact
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)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|