hi...

i started using c # .net now only... i am new t this....

i have a doubt.. can anyone help me ?

here is my question

i am writing a function in one form to add the values into the combo box from the table,

i am using the same combo box in some other form also and also i need to add the same values in that combo box...

whether i can use the same function which i have written already ?

if possible can any one tell me how can i do it ?


thanks in advance

Recommended Answers

If your function can be shared between few forms, why don't take it off the specific form and put it in a separate class?
It even can be a static method, accessible from outside. So you just call it in your forms.

Jump to Post

All 2 Replies

If your function can be shared between few forms, why don't take it off the specific form and put it in a separate class?
It even can be a static method, accessible from outside. So you just call it in your forms.

Simply use web service or wcf service to access your content not only from different forms but also from different applications.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.