What is the difference between Equality Operator (==) and Equals() Method in C#?

Technology Community › Category: C# › What is the difference between Equality Operator (==) and Equals() Method in C#?
VietMX Staff asked 5 years ago

The == Operator (usually means the same as ReferenceEquals, could be overrided) compares the reference identity while the Equals() (virtual Equals()) method compares if two objects are equivalent.