Programming Languages White Papers
A Solution to Mixed-Type Comparisons in C# .NET
Overview Overriding Equals() in order to provide meaningful semantics to object comparisons, turns out to be quite a challenging task, especially when involving objects at different levels of a class hierarchy. One need to reconcile the requirements of the equals contract with the legitimate expectations of programmers of being able to meaningfully compare objects of different types. This paper presents a generalized implementation of the navigation method by using reflection and late binding techniques available in C# .NET. A non-recursive version of the navigation method is also given; this later version is more efficient and easier to understand.
| Publisher | Association of Information Technology Professionals (AITP) | File Format | |
|---|---|---|---|
| Date Published | October 2005 | ||
| Format | White Papers | ||
| Topics | |||


