kedar pawgi

kedar pawgi

  • NA
  • 20
  • 6.7k

how can i do code reusable in c#

Jan 27 2013 9:24 AM
Hi i need help regarding creating code reuse. I am developing desktop application where there are lots of form. In every form there are many textboxes, dropdown list box, i have button for adding new record . When i click "new" button for adding new record, what i do first is clear the contents of the textboxes and dropdown box(code is like ---- txtName.text=" ",txtAddr.text="",cbSupplierName.text="" to give some example). I do this thing for every form where i have to add new record. i do whole thing for every form. The help i want is how can i use the same code for every form or is there any way i can just get rid of this type of way of coding. Please guide me.. It becomes very tiresome to do the same code again and again.
Thanks in Advance.

Answers (5)