I've been playing about with C# and have created a simple memory game in which I had to overload the == and != operators, but I keep getting the following warnings:

Code:

Warning 1 'MemoryGame.Card' defines operator == or operator != but does not override Object.Equals(object o) C:\Documents and Settings\meaCulpa\My Documents\Visual Studio 2008\Projects\MemoryGame\MemoryGame\Card.cs 8 18 MemoryGame
Warning 2 'MemoryGame.Card' defines operator == or operator != but does not override Object.GetHashCode() C:\Documents and Settings\meaCulpa\My Documents\Visual Studio 2008\Projects\MemoryGame\MemoryGame\Card.cs 8 18 MemoryGame



Do you have to override the methods that the warnings suggest or is it ok to leave them be?

Heres the class in which I do the actual overloading:
Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MemoryGame
{
public class Card
{
public enum Suits
{
Spades = 0,
Clubs,
Diamonds,
Hearts
}

public enum Values
{
Ace = 1,
Two,
Three,
Four,
Five,
Six,
Seven,
Eight,
Nine,
Ten,
Jack,
Queen,
King
}

public Suits Suit;
public Values Value;
private string name;
private bool faceDown;

public string Name
{
get
{
if (faceDown)
return "CardBack";
else
return name;
}
}

public Card(Suits suit, Values value)
{
Suit = suit;
Value = value;
name = value.ToString() + " of " + suit.ToString();
faceDown = true;
}

public void Flip()
{
faceDown = !faceDown;
}

public static string Plural(Card.Values value)
{
if (value == Values.Six)
return "Sixes";
else
return value.ToString() + "s";
}

public static bool operator==(Card card, Card card2)
{
if (System.Object.ReferenceEquals(card, card2))
{
return true;
}

if (((object)card == null) || ((object)card2 == null))
{
return false;
}

if (card.Suit == card2.Suit && card.Value == card2.Value)
return true;
else
return false;
}

public static bool operator !=(Card card, Card card2)
{
if (card == card2)
return false;
else
return true;
}
}
}



The full project is here if you want to take a look, I'd appreciate any other comments on the code, anything that you think is out of place, poor practice etc.

One last thing I would like to create an effect where it looks like the card dissolves when flipping the cards back if you pick wrongly. Does anyone have any ideas how this could be achieved?