Results 1 to 5 of 5

Thread: [RESOLVED] [2005] ListBox.Contains() does not work for custom Classes

Threaded View

  1. #1

    Thread Starter
    Lively Member mightor's Avatar
    Join Date
    Apr 2007
    Location
    Turn around, I'm right behind you...
    Posts
    99

    Resolved [RESOLVED] [2005] ListBox.Contains() does not work for custom Classes

    Hi there,

    I have a Class called Server which has a toString() method and some other attributes. When I add instances of this class to the ListBox, the toString() function is called and it is displayed properly in the ListBox. However, I currently have no way to check if an object with identical attributes is already in this ListBox.
    I am sure there is a trick to this that involves overloading an operator of some kind. Could someone please tell me which one I need to implement in my Server class to make this work?

    Thanks in advance!
    Last edited by mightor; Apr 25th, 2007 at 02:35 AM. Reason: Forgot the version of vb.net in the title

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width