How to override the == operator

Viewed 1389

How can I define the operator == for instances of my class? I tried like this:

public bool operator == (Vector anotherVector)
{
    return this.CompareTo(anotherVector) == 1 ;              
}

but it says:

overloadable unary operator expected

3 Answers
Related