Yesterday is history, tommorrow is mystery , today is a gift ,that's why it is called present.
发布新日志
-
2009-12-11 14:57:03
1.简介:简言之,就是使用部分类定义,使类的定义横跨多个文件。部分类对 Windows应用程序隐藏与窗体布局相关的代码有很大的影响,如:在Form1类中,Windows窗体的代码存储在Form1.cs和Form1.Designer.cs中,这样就可以主要考虑窗体的功能,无需担心代码会被自己不感兴趣的信息搅乱。
2.部分类定义方法:在每个包含部分类定义的文件中对类使用partial关键字:
public partial class MyClass
{
...
}
3.应用于部分类的接口也会应用于整个类。如:下面的两个定义是等价的:
public partial class MyClass : IMyIterface1
{
...
}
public partial class MyClass : IMyIterface2
{
...
}
和
public class MyClass : IMyIterface1,IMyIterface2
{
...
}
查看(416)
评论(0)
收藏
分享
管理
-
2009-02-10 16:53:24
Dim totalcol,value totalcol = datatable.GetSheet("Global").getparametercount For i=1 to totalcol value = datatable.GetSheet("Global").getparameter(i).name msgbox value Next |
查看(808)
评论(0)
收藏
分享
管理
-
2008-10-17 17:17:06
工具栏识别不了,录制时Expert View中什么都没有,用了DeviceReplay对象成功回放
Function tlbZCP(x , y)
Dim device
Set device = CreateObject("Mercury.DeviceReplay")
device.MouseMove x , y
device.MouseClick x, y , LEFT_MOUSE_BUTTON
End Function
tlbZCP 490,32
查看(517)
评论(0)
收藏
分享
管理