I have this UserControl:
public static Type typCreate;
LoadUserControl<T>()
{
typCreate = typeof( T );
}
protected void ButtonCommand( object sender, CommandEventArgs e )
{
x.Execute<typCreate>();
}
Considering that the method LoadUserControl
is the main method and the event ButtonCommand
is fired by a button on the UserControl, I'm trying to call this method on the event:
class x
{
public static T Execute<T>() { ... }
}
The error given by VS is saying that typeCreate is a 'field' but is used like a 'type'.
How can I do this work properly?
Thanks in advance.