I've been thinking of taking a more object-orientated approach to my programs...I use classes a lot but have never actually made an entirely object-orientated program.

I have a question.

An example is, a chat program. There is a class for a User and a class for a Chat Room. Each user has a Chat Room property which is a ChatRoom object.

Now, if I were to send a message to all users in that chat room, how would I compare Chat Room objects? Because you can't do:

vb Code:
  1. If User1.ChatRoom = User2.ChatRoom Then
  2.     'Send data...
  3. End If

Any ideas?