The thing mobile boy 36 means is how to instantiate an object from a
class with a given name. For example: MyForm is the class. In a
Function he wants to write some thing like: Form a =
getFormByName("MyForm")
Do you have a Vb.net code snippet using reflection ?
It 's not so clear to me what I have to pass to the typename parameter. This
is my code:
Private Shared Function GetFormByName(ByVal FormName As String) As Form
return Activator.CreateInstance(Type.GetType(FormName, True, True))
End Function
What is wrong with it ? I get the error "System.NotSupportedException"
Does the compact framework support this ?