G
GeezerButler
I have 2 objects which could be of any type (but both are of same
type)
I would like to check if it has the "greater than" or "less than"
operator overloaded. If it does, then i would like to compare the 2
objects using the operators. Is this possible to do?
In general, i am solving this problem, "If 2 objects can be compared,
return their comparison value".
I can check if they implement IComparer/IComparable but i don't know
how to proceed after that.
type)
I would like to check if it has the "greater than" or "less than"
operator overloaded. If it does, then i would like to compare the 2
objects using the operators. Is this possible to do?
In general, i am solving this problem, "If 2 objects can be compared,
return their comparison value".
I can check if they implement IComparer/IComparable but i don't know
how to proceed after that.