Jul 12, 2005 #1 Fifer74 Programmer Feb 25, 2003 12 0 0 GB Is it possible to convert a variable length structure into a bytearray ? Thanks in advance.
Jul 12, 2005 1 #2 tyreejp Programmer Apr 20, 2005 114 0 0 US Yes. You can serialize it. After it's been serialized, then it *IS* a bytearray. -- James http://www.microsoftjr.com Upvote 0 Downvote
Yes. You can serialize it. After it's been serialized, then it *IS* a bytearray. -- James http://www.microsoftjr.com
Jul 13, 2005 Thread starter #3 Fifer74 Programmer Feb 25, 2003 12 0 0 GB I am only after the data within the structure. When I serialize it, I appear to get a lot more information that I want or need. Upvote 0 Downvote
I am only after the data within the structure. When I serialize it, I appear to get a lot more information that I want or need.
Jul 13, 2005 1 #4 chiph Programmer Jun 9, 1999 9,878 0 0 US The .net binary serializer will always include information about the assembly, type info, etc. and this is probably what you're seeing. Chip H. ____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first Upvote 0 Downvote
The .net binary serializer will always include information about the assembly, type info, etc. and this is probably what you're seeing. Chip H. ____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first
Jul 13, 2005 #5 tyreejp Programmer Apr 20, 2005 114 0 0 US If you're only interested in converting the data that the stucture holds, I'd imagine that you'd have to use the Convert function and call MyByteArray = Convert.FromBase64String(MyStructure.MyVariable) -- James http://www.microsoftjr.com Upvote 0 Downvote
If you're only interested in converting the data that the stucture holds, I'd imagine that you'd have to use the Convert function and call MyByteArray = Convert.FromBase64String(MyStructure.MyVariable) -- James http://www.microsoftjr.com