Public Sub New(ByVal oldC As Control)
Dim FQTN As String = oldC.GetType.FullName
Dim t As Type = Type.GetType(FQTN)
Dim newC As Object = Activator.CreateInstance(t)
End Sub
FQTN
正在返回正确的类型名称,但是t
是Nothing
. 例如,FQTN = System.Windows.Forms.Panel
.