Extending dynamic sorting of objects using lightweight code generation.
Posted by: Marc's Musings,
on 09 Mar 2006 |
View original | Bookmarked: 0 time(s)
RE: Dynamic sorting of objects using lightweight code generation.I got a report of issues sorting objects that have null (not Nullable<T>) values. In the previous implementation, I blindly call down to the CompareTo method associated with the property's Type. This obviously doesn't work with virtual methods. For some types (like String) it was enough to simply make the emitted code a Call instead of a CallVirt, but I didn't want to be half-right. So the new version does the right thing and...