|
-
Jan 4th, 2010, 09:08 PM
#1
Thread Starter
New Member
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
-
Jan 4th, 2010, 09:14 PM
#2
Frenzied Member
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.
-
Jan 4th, 2010, 09:28 PM
#3
Thread Starter
New Member
Re: Saving Classes Past Close
 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?
-
Jan 4th, 2010, 09:31 PM
#4
Re: Saving Classes Past Close
goto http://msdn.microsoft.com .... search for serialization...
-tg
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|