Hello
I'm looking for a solution of my problem. I would like to create a class by clicking a button in web forms. Button would create an object in Form Design which can be configurated by user. This would be ZedGraph object and a user will have configuration window where he can choose X and Y and configure them as they want. In other words. I want to create class which will be impelemted automaticly as template. Is there any design patter ? Any kind of help will be appreciated.
Anupam SinghPosted May 21, 2014, 1:20 AM
It is possible to create instance of a class at run time (e.g. on button click).
But it must be known at compile time.
you can achieve this using :
class MyClass
{
public MyClass()
{...}
// properties.. etc
}
private void Button_click(sender s,EventHandler hndlr)
{
MyClass obj=new MyClass();
// to do..
}
Hope this will help.