How to create common method used in Web form as well as Windows form

Sandip

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

Sandip

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to used for loop to create table in django form

From Dev

How to create objects that can be used by multiple methods in form

From Dev

How to create objects that can be used by multiple methods in form

From Dev

Method for create new instance of form

From Dev

how to translate this if statement?into the common form

From Dev

Create a config file with Windows Form

From Dev

How can I create a web component that acts like a form element?

From Dev

How can I create a web form using Microsoft Word?

From Dev

In Allegro Common Lisp Form application on Windows is there global form and button variables?

From Dev

How to call web API login action from Windows form app

From Dev

How to overwrite form method on form created by code?

From Dev

How to overwrite form method on form created by code?

From Dev

How to Dynamically Create a Grid in C# Windows Form Application

From Dev

How to create an options form in C# Windows Forms?

From Dev

how to create a zero button in calculator in windows form calculator

From Dev

C# Windows Form - How can I call array initialized in click method to other parts of the form

From Dev

How to resize a windows form from another form

From Dev

Windows Form Application how return value form one form to other

From Dev

Windows Form is setting the data row state to detached. How can I preserve the data row state as well as it's data?

From Dev

How to use a Method of an Active Form

From Dev

HTML form is not working well with form input

From Dev

how to use both form validation as well user id exists in codeIgniter

From Dev

create custom options for form builder add method

From Dev

Rails getting form value to create method

From Dev

How to check which form is used to access current form?

From Dev

How to check which form is used to access current form?

From Dev

How to create a simple AEM form

From Dev

How to create a custom form in moodle?

From Dev

How to create a non rectangular form?

Related Related

  1. 1

    How to used for loop to create table in django form

  2. 2

    How to create objects that can be used by multiple methods in form

  3. 3

    How to create objects that can be used by multiple methods in form

  4. 4

    Method for create new instance of form

  5. 5

    how to translate this if statement?into the common form

  6. 6

    Create a config file with Windows Form

  7. 7

    How can I create a web component that acts like a form element?

  8. 8

    How can I create a web form using Microsoft Word?

  9. 9

    In Allegro Common Lisp Form application on Windows is there global form and button variables?

  10. 10

    How to call web API login action from Windows form app

  11. 11

    How to overwrite form method on form created by code?

  12. 12

    How to overwrite form method on form created by code?

  13. 13

    How to Dynamically Create a Grid in C# Windows Form Application

  14. 14

    How to create an options form in C# Windows Forms?

  15. 15

    how to create a zero button in calculator in windows form calculator

  16. 16

    C# Windows Form - How can I call array initialized in click method to other parts of the form

  17. 17

    How to resize a windows form from another form

  18. 18

    Windows Form Application how return value form one form to other

  19. 19

    Windows Form is setting the data row state to detached. How can I preserve the data row state as well as it's data?

  20. 20

    How to use a Method of an Active Form

  21. 21

    HTML form is not working well with form input

  22. 22

    how to use both form validation as well user id exists in codeIgniter

  23. 23

    create custom options for form builder add method

  24. 24

    Rails getting form value to create method

  25. 25

    How to check which form is used to access current form?

  26. 26

    How to check which form is used to access current form?

  27. 27

    How to create a simple AEM form

  28. 28

    How to create a custom form in moodle?

  29. 29

    How to create a non rectangular form?

HotTag

Archive