3 public interface IComparer
<T
>
8 class IC
: IComparer
<Foo
<int>>
10 public void Compare (Foo
<int> a
)
26 public virtual void Sort (IComparer
<T
> c
, T t
)
28 Sorting
.IntroSort
<T
> (c
, t
);
34 public static void IntroSort
<T
> (IComparer
<T
> c
, T t
)
36 new Sorter
<T
> (c
, 4, t
).InsertionSort (0);
44 public Sorter (IComparer
<T
> c
, int size
, T item
)
50 internal void InsertionSort (int i
)
53 c
.Compare (other
= a
[i
]);
62 List
<Foo
<int>> list
= new List
<Foo
<int>> ();
63 Foo
<int> foo
= new Foo
<int> (3);
64 list
.Sort (new IC (), foo
);