Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert structure to bytearray 2

Status
Not open for further replies.

Fifer74

Programmer
Feb 25, 2003
12
0
0
GB
Is it possible to convert a variable length structure into a bytearray ?

Thanks in advance.
 
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.
 
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
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top