摘要: Private Sub GetTestSheets_Click() Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Dim path As String path = ThisWorkbook.path & "\WorkBooks\" Dim folder Set folder = fso.GetFolder(p... 阅读全文
posted @ 2010-10-15 09:04 ntcosmos 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1 自定义一个类,并且保证它的可序列化的:实现ISerializable接口;或者用[Serializable]标记(如果有父类,则父类也需要被标记;可以[NonSerialized()]标记类中不想被序列化的字段) 2 注册自定义数据格式:调用静态方法DataFormats.GetFormat() 3 保存数据到clipboard:利用IdataObject接口,创建一个数据对象,并设置数据;调... 阅读全文
posted @ 2010-02-02 18:50 ntcosmos 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 数据点: 列表达式、DataRelations 和计算http://msdn.microsoft.com/zh-cn/magazine/cc163495.aspx 阅读全文
posted @ 2010-01-22 00:17 ntcosmos 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 1.Base class for cloning an object in C# 阅读全文
posted @ 2009-12-14 04:45 ntcosmos 阅读(104) 评论(0) 推荐(0) 编辑
摘要: db2 自动增长列从论坛里查询得到以下结果:1.生成列和标识列对于自增字段,可以通过两种方式指定:generated by default as identitygenerated always as identity区别是,第一种方式在... 阅读全文
posted @ 2009-12-01 19:05 ntcosmos 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1.Control 刷新打开缓冲,防止闪烁 SetStyle(ControlStyles.DoubleBuffer | ControlS... 阅读全文
posted @ 2009-11-26 18:30 ntcosmos 阅读(97) 评论(0) 推荐(0) 编辑
摘要: 一.委托1.delegate 自然是要和 目的方法有相同的参数。 delegate要初始化: public delegate void 阅读全文
posted @ 2009-10-29 23:24 ntcosmos 阅读(81) 评论(0) 推荐(0) 编辑
摘要: *自动属性(Auto-... 阅读全文
posted @ 2009-10-28 18:19 ntcosmos 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 1.为避免多次输入同样的东西, 可新建一个类(结构体)来替代存储2.const的值是在编译期间确定的,因此只能在声明时通过常量表达式指定其值。而static readonly是在运行时计算出其值的,所以还可以通过静态构造函数来赋值。3.依赖关系:... 阅读全文
posted @ 2009-10-21 18:25 ntcosmos 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 转自:http://tech.ddvip.com/2008-01/119955698139982.html//Demo--1//扩展基本类型namespace TestExtensionMethods{// 必须建一个静态类,用来包含要添加的扩展方法public static class Extensions{//要添加的扩展方法必须... 阅读全文
posted @ 2009-10-19 22:18 ntcosmos 阅读(93) 评论(0) 推荐(0) 编辑