troubleshooting Question

Class Methods - "Equals" and "ReferenceEquals"

Avatar of Mr_Fulano
Mr_FulanoFlag for United States of America asked on
.NET ProgrammingC#
8 Comments1 Solution466 ViewsLast Modified:
Hi, I'm using MS VS2010, C#.NET. I have what may be somewhat of an academic question.

I created a custom Class in one of my applications. As a default, the Class has two methods in it. Those being the "Equals" and "ReferenceEquals" methods.

Why is this a default? I would assume that my custom Class is getting the methods through inheritance from perhaps the Object Class, but why would any Class want to have such methods as defaults?

Thanks for your help,
Fulano
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros