2012年3月31日
摘要: public class SortHelper<T> where T : IComparable{ public void BubbleSort(T[] array) { for (int i = 0; i < array.Length; i++) { for (int j = i + 1; j < array.Length; j++) { if (array[i].CompareTo(array[j]) < 0) { T temp = array[i]; array[i] = array[j]; array[j] = temp; } } } }}protecte 阅读全文
posted @ 2012-03-31 15:02 李菲菲 阅读(183) 评论(0) 推荐(0) 编辑