static public object ChangeType(object value, Type type) { if (value == null && type.IsGenericType) return Activator.CreateInstance(...
分类:
其他好文 时间:
2014-06-28 18:28:53
阅读次数:
212
在我们的应用程序中我们使用类描述我们的业务对象,为我们产生一些报表之类的,那就依赖大量不同的对象,我们创建一个帮助方法来转换我们的业务对象,或是一个List的业务对象到DataTables.由于数据库表中字段可为null,对应.net 2.0以后我们可用Nullable类型来实现,那当我们业务对象类...
分类:
其他好文 时间:
2014-06-28 18:07:35
阅读次数:
210
IF OBJECT_ID('tb') IS NOT NULL DROP TABLE tbcreate table tb(id varchar(3) , pid varchar(3) , name varchar(10))insert into tb values('001' , null ,...
分类:
数据库 时间:
2014-06-28 17:58:36
阅读次数:
470
#include #include char data_file[]="D:\\%\\datetime.dat";void get_data(void){ FILE *fp; time_t t; if((fp = fopen(data_file,"r")) == NULL) printf("本程序第...
分类:
其他好文 时间:
2014-06-28 15:25:41
阅读次数:
254
js词法环境包括环境变量绑定及外部引用'函数创建的时候有个内部属性[[scope]],它指向当前函数的词法环境对象。而词法环境的外部引用一个词法环境'直到全局词法环境'它外部引用为null'这样就构成作用域链。当进入可执行代码时'会创建执行环境'执行环境包括词法环境变量环境及this关键字绑定'如果...
分类:
Web程序 时间:
2014-06-28 15:18:07
阅读次数:
223
Oracle没有自增字段这样的功能,但是通过触发器(trigger)和序列(sequence)可以实现。先建一个测试表了:create table userlogin( id number(6) not null, name varchar2(30) not null primary key)tab...
分类:
数据库 时间:
2014-06-20 18:51:30
阅读次数:
277
private void FocusFirstTabIndex(Control container){ // init search result varialble Control searchResult = null; // find the control with the...
分类:
其他好文 时间:
2014-06-20 17:43:54
阅读次数:
178
1 T* Detach() throw()2 {3 T* pt = p;4 p = NULL;5 return pt;6 }
分类:
其他好文 时间:
2014-06-20 17:30:49
阅读次数:
130
static BOOL flag=NO; dispatch_queue_t myQueue=dispatch_queue_create("identifier", NULL); dispatch_async(myQueue, ^{ for (int i=0; i<10; i++...
分类:
编程语言 时间:
2014-06-20 16:36:20
阅读次数:
195
1 char szDirName[] = "文件路径"; 2 CreateDirectory(szDirName, NULL) ; 3 //这样就可以了CreateDirectory功能:This function creates a new directory. If the underlyin....
分类:
编程语言 时间:
2014-06-20 15:04:20
阅读次数:
275