Tags: , , ,

We all use <, <=, >, and >= with integers and floating point values all the time. It just works and it’s built into basically every programming language. These simple operators suddenly become quite a pain when you start wanting to compare other objects. IComparable seems to make it easier, but there’s some trickiness when you start dealing with null objects. Today’s article explores this and ends up with some handy utility functions to take some of the gotchas out of comparing.

Read the rest of this article »

No Comments