摘要: http://zhidao.baidu.com/question/394595893.htmlvar dir = System.IO.Path.GetDirectoryName(physicalPath); 可以获得不带文件名的路径 阅读全文
posted @ 2012-05-15 16:05 Billy.rao 阅读(929) 评论(0) 推荐(0) 编辑
摘要: http://wenwen.soso.com/z/q329530246.htm?ch=wtk.titleforeach(KeyValuePair<string,Class1> item in c1){ c2.Add(item.Key,item.Value);} 阅读全文
posted @ 2012-05-14 19:09 Billy.rao 阅读(407) 评论(0) 推荐(0) 编辑
摘要: http://zhidao.baidu.com/question/154145824.html//一个enum的例子enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 };//转换的例子Colors myColor = (Colors)Enum.Parse(typeof(Colors), "Yellow"); 阅读全文
posted @ 2012-05-14 15:31 Billy.rao 阅读(386) 评论(0) 推荐(0) 编辑
摘要: http://zhidao.baidu.com/question/91664114.htmlclass GetEnumValues { public static void Main() { Type Sexs = typeof(SexKind); Console.WriteLine("The kinds of the Sex:"); foreach (string s in Enum.GetNames(Sexs)) { Console.WriteLine(s); } } } enum SexKind { Male, Female } 阅读全文
posted @ 2012-05-14 15:11 Billy.rao 阅读(192) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2012-05-14 10:40 Billy.rao 阅读(9) 评论(0) 推荐(0) 编辑
摘要: datagridview 添加行http://zhidao.baidu.com/question/313403045.htmldataGridView1 一开始是为空的。没有资料行。这个时候如果你指定DataGridViewRow row = dataGridView1.Rows[i];是会报错的。因为找不到资料行位置。但是当我们一开始就执行dataGridView1.Rows.Add( );这样系统会在dataGridView1创建一行空的资料。索引默认从0开始,这样我们再把第0行DataGridViewRow row = dataGridView1.Rows[i];就不会出错了。 阅读全文
posted @ 2012-05-11 10:56 Billy.rao 阅读(176) 评论(0) 推荐(0) 编辑
摘要: http://zhidao.baidu.com/question/198956423.htmlthrow new System.NotImplementedException(); 意思是:抛出NotImplementedException 类的新实例,即抛出一个NotImplementedException异常System.NotImplementedException是指在无法实现请求的方法或操作时引发的异常。如果没有设定,在程序运行过程中发生这样的异常的话,编译之后会提示你发生了一个NotImplementedException异常也可以像这样人为设定,用以控制程序的运行 阅读全文
posted @ 2012-05-11 09:15 Billy.rao 阅读(654) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/lidabo/archive/2012/04/17/2454568.html一、C++编译模式通常,在一个C++程序中,只包含两类文件——.cpp文件和.h文件。其中,.cpp文件被称作C++源文件,里面放的都是C++的源代码;而.h文件则被称作C++头文件,里面放的也是C++的源代码。C+ +语言支持“分别编译”(separate compilation)。也就是说,一个程序所有的内容,可以分成不同的部分分别放在不同的.cpp文件里。.cpp文件里的东西都是相对独立的,在编 译(compile)时不需要与其他文件互通,只需要在编译成目标文件后再与 阅读全文
posted @ 2012-05-09 16:19 Billy.rao 阅读(262) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2012-05-09 15:53 Billy.rao 阅读(10) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2012-05-09 15:24 Billy.rao 阅读(8) 评论(0) 推荐(0) 编辑