/ Published in: VB.NET
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Public Class ClassName Private Shared objClassName As ClassName Private Shared blnClassAlreadyCreated As Boolean = False Private Sub New() End Sub Public Shared Function setupClass() As ClassName If blnClassAlreadyCreated = False Then objClassName = New ClassName() blnClassAlreadyCreated = True End If Return objClassName End Function End Class
URL: http://www.ondotnet.com/pub/a/dotnet/2002/11/11/singleton.html