My .NET Misunderstanding: Object.Equals and Object.GetHashCode

by Michael F. Collins, III October 18, 2009 09:13

What I like about software development is that after developing software for sixteen years, I can still learn new things. Sometimes, in fact, like this morning, I can learn new things about topics that I thought that I’ve understood in the past, only to find out what I was wrong. I honestly believe that to be a good learner, you need to accept that not everything that you do is correct, and that sometimes you thought they were correct given your understanding of the information available, which in this case is accurate.

This morning, driven by some information that I noticed in the Objective-C documentation for the NSObject class, I decided to do some digging. In earlier posts about NSObject, I was looking at some of the similarities to the .NET System.Object class and the Java root Object class. Specifically, I was looking at the Equals and GetHashCode methods in .NET and their similar constructs in Java and Objective-C. The problem lay with the statements in the Objective-C documentation that said (summarized) an object should give back the same hash code each time and that if two objects are equal, then they should have the same hash code. More...

Tags: , , , , ,

Objective-C | Java | .NET Framework

Bruised, but not defeated by Java

by Michael F. Collins, III April 08, 2009 06:01

I used to be a 100% Java programmer back in the late 90’s and 2000-2001. Well, that’s not true. I was about 80% Java, 20% MFC/C++/Windows. But then .NET came into my world and I decided that I really wanted to be back developing true Windows applications (I didn’t need the run anywhere promise of Java), and I haven’t really looked back. But then, in 2009, I hit a problem that I could only solve in Java, and I realize how much of that former knowledge that I have lost. More...

Tags: , ,

Version Control | FitNesse | Java

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen | Modified by Mooglegiant

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

What I'm reading now


Add to Technorati Favorites

Disclaimer

The views expressed on this website/blog are the opinions of Michael F. Collins, III, and do not necessarily reflect the views of my employer.