Saving Classes Past Close
Ihave created several classes and i wanted to know who to store the data enclosed in the classs. For Example
Code:
Public Class Session
Public total_money As Integer
End Class
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Session1 As New Session
Session1.total_money = 8
End Sub
If i wanted to store that value past the close of the application, how would I? I already know I cant use the settings class. And what if i have multiple new classes. Help! Thanks
Re: Saving Classes Past Close
You'll either save the information to a file or a database.
If saving to a file, the easiest way is to use serialization.
Serialization is very easy because it only takes a few lines of code to save all the values
from the class.
Re: Saving Classes Past Close
Quote:
Originally Posted by
FourBlades
You'll either save the information to a file or a database.
If saving to a file, the easiest way is to use serialization.
Serialization is very easy because it only takes a few lines of code to save all the values
from the class.
do u think u can give me a quick rundown of what serialization is and how to use it (code, examples etc) or maybe a website about it?
Re: Saving Classes Past Close
goto http://msdn.microsoft.com .... search for serialization...
-tg