Cesar,
Without Shared, each consumer of the class will need to create an instance
of the class then access the properties. Which for this sort of thing the
Singleton Pattern is better, you do however need to use Shared to implement
a Singleton.
You could make the class itself a Singleton, when means the properties will
not be marked shared, however a read only shared Instance field will be
created in the class.
Public Class DbSettings
Public Shared Readonly Instance As New DbSettings()
Private Sub New()
End Sub
Public Property DatabasePath...
End Class
Then whenever you need to use any of the properties of the class you use
DbSettings.Instance.DatabasePath.
Hope this helps
Jay
"cksj" <ck*******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I'm working on a VB.Net DLL project. It has 6 classes. One of the classes
has the properties for the database path, database name and server name.
The purpose of this class is so that the DLL can be tested on different
servers. Without using the keyword "Shared", how can I share these data to the
other 5 classes?
Thanks for any ideas!
Cesar