예제 #1
0
파일: Utils.cs 프로젝트: rvprg/rvscheme
        public static bool CompareList <T> (CompareProc <T> proc, List <T> list)
        {
            bool res = true;

            for (int i = 0; i < list.Count - 1; ++i)
            {
                res = res && proc(list[i], list[i + 1]);
            }
            return(res);
        }
예제 #2
0
 static extern unsafe void qsort(void *items, IntPtr itemCount, IntPtr itemSize, CompareProc proc);
예제 #3
0
 // IntPtr (size_t) と int との変換の手間を省くためのオーバーロード
 static unsafe void qsort(void *items, int itemCount, int itemSize, CompareProc proc)
 {
     qsort(items, new IntPtr(itemCount), new IntPtr(itemSize), proc);
 }
예제 #4
0
 static extern unsafe void stdcall_qsort(void *items, int itemCount, int itemSize, CompareProc proc);