How to Saving value of variables into a file?
i want to do these...
How to Saving value of variables into a file?
case:
'on module
Module Module1
Public x, y, z as Integer
Public a, b, c as String
End Module
'on Form
there are 6 Textbox: T1, T2, T3,...T6; And 3 Button: Button1, Button2, Button3;
'code for button1
Private Sub Button1_Click(...) Handles Button1.Click
x=me.T1.Text
y=me.T2.Text
z=me.T3.Text
a=me.T4.Text
b=me.T4.Text
c=me.T4.Text
End Sub
for example: now the values of these variables are:
x=1
y=2
z=3
a="Test1"
b="Test2"
c="Test3"
so, when i click Button2, i want to save all of these variables value into a file(file1.txt),
and i close my aplication and then run it again. my variables now empty(x,y,z,a,b,c)
so when i click button3, i want to load the selected file(file1.txt) who saving the values of variables into my variables;
so when i need these value, i don't have to type the value of each variables on my Textboxs again to fill these variables.
note: the value of variables(x,y,z,z,b,c) not only one, we can save new variables value into a new file, so we can load it again when we need it. it's meant that we may having much file which it saving our variables value.
what must i do?
somebody have an Idea to do that? Please help me!
Thanks very Much Before..