I want to create a common method which will use in both web as well as windows form.
Currently I have class like
public class Demo
{
public object getData(object o)
{
//Code use by both windows and webform
}
}
I want to use getData(..) method in both windows as well as web form.
how can I do this ?
Thanks
I've solve this issue by create Generic method in a class like
abstract Class Demo
{
public object GetData<T>(T obj) where T : objectname;
}
now I can pass both web and windows class name in this method.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments