public static T[] BubbleSort(this T[] arr) where T : class { for (int i = 0; i < arr.Length; i++) { for (int j = 0; j <
A couple of ways you could go about doing this:
IComparable
CompareTo
IComparer