이해할 수있는 설명하고, 내가 이런 만들 것을 확실하지 않다 :Activator.CreateInstance로가 - 그것은 내가 그래서 몇 가지 예제 코드를 찾고
Private Shared _instance As PollsProvider = Nothing
Public Shared ReadOnly Property Instance() As PollsProvider
Get
If IsNothing(_instance) Then
_instance = CType(Activator.CreateInstance(_
Type.GetType(Globals.Settings.Polls.ProviderType)), PollsProvider)
End If
Return _instance
End Get
End Property
위의 방법 I을의 차이점은 무엇입니까 두번째는 컴파일 PollsProvider의 형태를 갖는 반면, 제 코드 단편 구성에서 만들 PollsProvider의 종류를 판독
Private Shared _instance As PollsProvider = Nothing
Public Shared ReadOnly Property Instance() As PollsProvider
Get
If IsNothing(_instance) Then
_instance = New PollsProvider
End If
Return _instance
End Get
End Property