Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Jul 27, 1998

Saving Object to File

Question:
Is it possible to save an object (in my case a collection) directly to a file, or must one extract the object's properties and save each individually?

Answer:
Visual Basic 6.0 (scheduled for release on Sept. 2, 1998) includes the ability to "persist" a class, that is, to save its state between executions of a program. This works the same way VB5 saves the properties of a UserControl: by means of the Read- and WriteProperties events and the PropertyBag object.

VB4 and 5, however, offer no built-in way to persist the properties of an object. You must roll your own <object>.Save method that writes the properties to a file, database, or the registry.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date