2 using System
.Collections
.Generic
;
4 public class NaturalComparer
<T
> : IComparer
<T
>
5 where T
: IComparable
<T
>
7 public int Compare (T a
, T b
)
9 return a
.CompareTo (b
);
15 class Test
: IComparable
<Test
>
17 public int CompareTo (Test that
)
22 public bool Equals (Test that
)
30 IComparer
<Test
> cmp
= new NaturalComparer
<Test
> ();