vb.net中使用Module扩展My命名空间
Namespace My '''扩展My的操作,方便用户使用 <HideModuleName()> _ Public Module MyExtender Private _loadProxy As LoadProxy Private _lockObject As New Object Public ReadOnly Property loadProxy() As LoadProxy Get If (_loadProxy Is Nothing) Then SyncLock _lockObject If (_loadProxy Is Nothing) Then _loadProxy = New LoadProxy End If End SyncLock End If Return _loadProxy End Get End Property End Module End Namespace 使用时,可以如下使用My.loadProxy.