Public Class ConfigManager
Private _Cm As ConfigManager
Private Sub New()
' making this private prevents anyone
' from creating this class
End Sub
Public Shared Function GetInstance() As ConfigManager
If _Cm Is Nothing Then
_Cm = New ConfigManager()
End If
Return _Cm
End Function
End Class
---
Patrick Steele ([EMAIL PROTECTED])
Lead Software Architect
Image Process Design
> -----Original Message-----
> From: Travis [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 01, 2003 8:36 PM
> To: dotnet
> Subject: Is Object valid in VB net
>
>
> I need to create a singlton pattern. I have to check to see
> if the object
> is null. I know in java I would code it like so...
>
> static synchronized public ConfigManager getInstance(){
>
> if((instance == null){
> instance = new ConfigManger();
> }//ends if
>
> return instance;
>
> }//ends getInstance Method
>
>
> how would I do this in VB.net?
---
You are currently subscribed to dotnet as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---------
Administrated by 15 Seconds : http://www.15Seconds.com
List Archives/Search : http://local.15Seconds.com/search
Subscription Information : http://www.15seconds.com/listserv.htm
Advertising Information: http://www.internet.com/mediakit/