I am in the middle of refactoring my class to be a generic class. I am having problems with converting the CompareTo part of the code.
Fact: T has a Int32 property called MyIndex
Here is the Half converted code. CompareTo is giving me grief :)
List<T> myList = new List<T>();
myList.Sort(delegate(T a, T b)
return a.MyIndex.CompareTo(b.MyIndex); // <--- Help with this part of the conversion pls.
I have tried something like but doesn't work.