A Solution to Mixed-Type Comparisons in C# .NET
Short Description
and late binding techniques available in C# .NET. In this implementation navigation is still us-. ing recursion very much like the one in (Langer, 2002b). …
Website: isedj.org | Filesize: 654kb
Content
Dollinger Fri, Oct 7, 3:30 - 3:55, Senate B
A Solution to Mixed-Type Comparisons
in C# .NET
Robert Dollinger
rdolling@uwsp.edu
Mathematics and Computing Department
University of Wisconsin Stevens Point
Stevens Point, WI 54481, USA
Abstract
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.
Langer&Kreft (Langer, 2002b) provided an implementation of equality checks for Java class
hierarchies where they use a recursive navigation method that performs the non-trivial task of
navigating up and down in the inheritance tree in order to make sure that objects on different
levels or even on different branches of the inheritance tree are compared correctly. In this paper
we first present a generalized implementation of the navigation method by using reflection
and late binding techniques available in C# .NET. In this implementation navigation is still using
recursion very much like the one in (Langer, 2002b). A non-…
Get the file Download here
Related Books:Related Searches: university of wisconsin stevens point, inheritance tree, class hierarchies, wisconsin stevens point, robert dollinger
Comments
Leave a Reply