I have the following code
var type = Type.GetType(BrowseDialogName);
var browseForm = Activator.CreateInstance(type) as MyBrowseForm<SPORTS>;
I'm using entity framework and SPORTS is the name of the poco class
my problem here is that this code is inside a custom textbox that has a button and I'm not able to get <T>
, at runtime I have the name of the poco class.
so I was wondering if I could do the casting at runtime.
any help or guide is very appreciated