Global application parameters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

I'm starting to do a little application for fun with VB.NET and would like to store some information about the user (name, point already won), loaded from a Xml file after login identification. Is there a way to store those information easily in an object global to the whole application ?...

Thanks for your help
 
Add new item to your project: Application Configuration
Then have a look at System.Configuration.AppSettingsReader class


Dominique

Gort said:
Hello,

I'm starting to do a little application for fun with VB.NET and would like
to store some information about the user (name, point already won), loaded
from a Xml file after login identification. Is there a way to store those
information easily in an object global to the whole application ?....
 
Hi Gort,

You have to simple posibilities, the registry or as you stated a XML file.
For a XML file you can simpel use a dataset.

Do not be afraid, it is very simple to make a dataset

\\\
'Make a datatable with 8 columns
Dim ds As New DataSet
Dim dt As New DataTable("yourstable")
For i As Integer = 0 To 7
Dim dc As New DataColumn(Chr(i + 65))
dt.Columns.Add(dc)
Next
'And 12 rows every column filled with a value
For i As Integer = 0 To 11
dt.Rows.Add(dt.NewRow)
For y As Integer = 0 To dt.Columns.Count - 1
dt.Rows(i)(y) = y.tostring
Next
Next
ds.Tables.Add(dt)
ds.WriteXml("C:\yourtable.xml")
///
And to read it
\\\
ds.ReadXML("C:\yourtable.xml")
///

I hope this helps?
I'm starting to do a little application for fun with VB.NET and would like
to store some information about the user (name, point already won), loaded
from a Xml file after login identification. Is there a way to store those
information easily in an object global to the whole application ?....
 
* "=?Utf-8?B?R29ydA==?= said:
I'm starting to do a little application for fun with VB.NET and would
like to store some information about the user (name, point already won),
loaded from a Xml file after login identification. Is there a way to
store those information easily in an object global to the whole
application ?....

Configuration Management Application Block
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/cmab.asp>

<http://www.palmbytes.de/content/dotnetlibs/optionslib.htm>
 
Back
Top