Gun*_*arJ 2 c# dll class object
如何创建与特定对象一起使用的类(在DLL中)?例如,Bitmaps调用的类可以执行某些操作.例如
位图bmp =新位图; bmp.ThingToDo():
Hom*_*mam 7
看看扩展方法.
您可以将您的方法添加到类Bitmap,如下所示:
public static class CustomExtension { public static void ThingToDo(this Bitmap bitmap) { // add your functionality here and use bitmap } }
祝好运!
归档时间:
15 年,3 月 前
查看次数:
320 次
最近记录: