随笔分类 -  c#

C#调用IronPython和C方法效率差别
摘要:平均调用时间差别一秒左右。C#调用C++代码:[DllImport("UseCPP.dll")]public static extern int Add(int x, int y);C++代码:#include "stdafx.h"extern "C" __declspec(dllexport) int Add(int x, int y) { return x + y;}IronPython:public static int CSUsePyFunc(int x, int y) { ScriptRuntime pyRT = Pytho 阅读全文

posted @ 2012-07-13 21:31 未来无限 阅读(480) 评论(0) 推荐(0)

泛型分页
摘要:using System;using System.Collections.Generic;using System.Text;namespace PublicClass{ public class PaginationInfo<T> { /// <summary> /// 每页记录数 /// </summary> public int PageSize { get; private set; } /// <summary> /// 实际每页记录数,最后一页记录数可能少于每页记录数 /... 阅读全文

posted @ 2012-07-13 21:11 未来无限 阅读(771) 评论(0) 推荐(0)

导航