PublicNotInheritableClass SingletonClass Singleton PrivateShared s As Singleton =New Singleton(47) Private i AsInteger=0 PrivateSub New()SubNew(ByVal x AsInteger) i = x End Sub PublicSharedFunction GetReference()Function GetReference() Return s End Function PublicFunction GetValue()Function GetValue() AsInteger Return i End Function PublicSub SetValue()Sub SetValue(ByVal x AsInteger) i = x End Sub End Class