摘要:简单工厂模式:从抽象类派生多个类型,在工厂类里面通过静态方法产生对象的实例 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/*--===------------------------------------------===--- 简单工...
阅读全文
摘要:如何保证一个类只能有一个实例存在? 在多线程情况下如何解决?Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->usingSystem;usingSystem.Collections.Generic;usingSystem.Text;namespaceSingleton{classSingleton{//构造函数私有化,保证不被显式实例化privateSingleton(){}//定义属性,返回Singleton对象privatestaticSi
阅读全文
摘要:DataSet包含DataTable类型的数组Tables。 每个DataTable又包含DataRow类型的Rows集合,包含DataColumn类型的Columns集合。 DataTable dataTable = dataSet.Tables[0]; DataRow dataRow = dataSet.Tables[0].Rows[0]; 取得列值: object columnValue =...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- CommandBuilder: 如果DataTable映射到单个数据库表或...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- CommandBuilder: 如果DataTable映射到单个数据库表或...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->/**//*--===------------------------------------------===--- 使用DataAdapter来更新数据集 //--===----------...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/**//*--===------------------------------------------===---DataAdapter的数据映射:表和列映射许明会2007年12月22日22:18:09DataSet包含DataTable类型的集合Tables。每个DataTable又包含DataRow类型的Rows集合,包含DataColumn类型的Columns集合,还有表间关系的Rel
阅读全文