using System; public static class generic { public static void swap< Type > (Type[] array,int i, int j) { Type tmp=array[i]; array[i]=array[j]; array[j]=tmp; } public static void quicksort< Type > ( Type[] array, int l, int r) where Type : IComparable< Type > { int i=l; int j=r; Type v=array[(int)((l+r)/2)]; for (;;) { while (array[i].CompareTo( v) < 0 ) i=i+1; while (v.CompareTo(array[j]) < 0) j=j-1; if (i<=j) { swap(array,i,j); i=i+1 ; j=j-1; } if (i>j) goto ended ; } ended: ; if (l (Type[] array,int size) { int i; int l; l=array.Length; for (i=0;i