edwingt Posted August 20, 2003 Posted August 20, 2003 I have a struct in vb.net like: structure test dim element1 as string dim element2 as integer dim element3 as bool end structure dim varTest as test I want to write and read the whole struct variable varTest in a file. I already try with fileput command like fileput(freefile,binarymodeRead,varTest) and it looks like it work but when I try to read de struct with fileget fileget(freefile,binarymodeWrite, varTest) the app give me this error Is there another way to read/write the whole struct into or from a file. Quote
*Experts* mutant Posted August 20, 2003 *Experts* Posted August 20, 2003 I would recommend looking into XML Serialization for doing things like that. XML Serialization the object or objects you want to write to a file a lays them out in an XML file. If you search Google for XML Serialization you should find a lot of examples and tutorials. And then use Deserialization to read back the file. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.