Hello!
I have a class lets call it Test with four fields.
This Test class implement IComparable so CompareTo is therefore implemented
in this Test class.
One field in this Test class is an int called Order.
The other are of type double called EAF, C_min, C_aim and C_max
I implement this CompareTo but I have run into some problems.
I want this CompareTo to be implemented in two different ways for this Test
class.
First of all I want to sort a collection for Test objects on this Order
field.
Second I have another class where I implement Compare. To this Compare
method I pass two object which are ArrayList
and then from this Compare method calls a made to CompareTo to check if the
two arrayList are identical when looking at
fields EAF,C_main,C_aim and C_max.
The problem it that I can only have one CompareTo?
Have anybody any suggestion to how I can solve my problem?
//Tony