how to access a property of one class ,and to show it in a list made at another form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tarundhoom
    New Member
    • Aug 2010
    • 4

    how to access a property of one class ,and to show it in a list made at another form?

    how to access a property of one class ,and to show it in a list made at another form?e.g i have a customer class and i wanna add data to the list made in master form customer form which is accessing the customerclass!!
  • adwenger0066
    New Member
    • Aug 2010
    • 4

    #2
    For the customer class, override the ToString() method with the information you want available in the List and then add the instance of Customer to the list.

    If you need the ability to alter the information, you may also need to create a method to Parse a string inside the customer class which your master form would have to call to update the data.

    Comment

    • tarundhoom
      New Member
      • Aug 2010
      • 4

      #3
      thank u i got it!!

      Comment

      Working...