c# - Can I compare two arbitrary references in a way that can be used in a CompareTo method? -


i'm writing implementation of icomparable<t>.compareto(t) struct. i'm doing member-wise comparison (i.e. d = a.compareto(other.a); if (d != 0) { return d; } etc.), 1 of members of class (let's call y) doesn't implement icomparable or have other reasonable way of comparing want compare references (in case know instances of y unique). there way of doing that yield int suitable use in comparison method?

it's not meaningful compare references looking order relationships. it's meaningful equality.


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -