关于委托的进一步了解

声明一个委托

public delegate  T GetListDelegate<T>(Datarow row)//Datarow 为参数类型

使用委托

public  List<T> GetDataSet<T>(string s ,GetListDelegate GetItem)

{

      List<T>  list = null;

     Datarow row=

      list.add(GetItem(row))

}

//得到ITEM的方法

private productlist GetItem()

{

}

猜你喜欢

转载自www.cnblogs.com/whl4835349/p/9577800.html