下一站天后

今朝的容颜老于昨晚

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  语法

摘要:[代码] 阅读全文
posted @ 2009-06-23 17:08 孙雅玲 阅读(347) 评论(0) 推荐(0)

摘要:Application.Exit和Environment.Exit(0)有什么退出方面的区别吗?Application.Exit:通知winform消息循环退出。会在所有前台线程退出后,退出应用强行退出方式,就像 Win32 的 PostQuitMessage()。它意味着放弃所有消息泵,展开调用堆栈,并将执行返回给系统 方法停止在所有线程上运行的所有消息循环,并关闭应用程序的所有窗口 Envir... 阅读全文
posted @ 2009-06-12 11:17 孙雅玲 阅读(919) 评论(0) 推荐(0)

摘要:得到一段json数据格式,但是字符串,想利用对象打点的方式得到其中的属性。这便让人想到反射。 粗略理解:将字符串以程序本身的意思去表达。这就是反射,通过这个例子牢牢的把反射学到。起码知道有他,下次在有这样功能的时候就知道怎么去找解决方法。在设计模式中,大量的用到反射! jrjIndexData[i].region 是msg里面的数据,eval(msg);反射该字符串msg 网上定义:反射机制指的... 阅读全文
posted @ 2009-04-29 15:31 孙雅玲 阅读(675) 评论(1) 推荐(0)

摘要:CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> private void button1_Click(object sender, EventArgs e) { Thread th = new Threa... 阅读全文
posted @ 2009-04-09 10:40 孙雅玲 阅读(186) 评论(0) 推荐(0)

摘要:如下Demo: Code Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> static void TestOut(out int a,out int b) { a = 1; ... 阅读全文
posted @ 2009-03-20 14:32 孙雅玲 阅读(218) 评论(0) 推荐(0)

摘要:Request.Form是获取以POST方式提交的表单数据; Request.QueryString主要是获取地址栏参数或者以Get方式提交的数据 而Request则包含以上两种方式,会在Request.QueryString(优先)和Request.Form中都查询一遍变量。但是优先获取GET方式提交的数据,即Request.QueryString 下面举例说明: 需求:在asp页面上提交... 阅读全文
posted @ 2008-12-02 10:02 孙雅玲 阅读(341) 评论(0) 推荐(0)

摘要:private static 和 public static 都是静态变量,在类加载时就定义,不需要创建对象 但是private static 是私有的,不能在外部访问,只能通过静态方法调用,这样可以防止对变量的修改 阅读全文
posted @ 2008-11-12 15:39 孙雅玲 阅读(17765) 评论(3) 推荐(0)

摘要:_xfs数据集,_xfs.Items其中的一张表 arr中存一个个对象,即一条条记录,即一张表 阅读全文
posted @ 2008-10-04 11:24 孙雅玲 阅读(234) 评论(0) 推荐(0)

摘要:break 是跳出for; continue 是继续循环的意思是 中断本次循环 接着做下一循环;return结束本方法。 阅读全文
posted @ 2008-09-27 17:20 孙雅玲 阅读(325) 评论(0) 推荐(0)

摘要:1。比较时间大小的实验 if(DateTime.Compare(dt1,dt2)>0) msg.Text=st1+">"+st2; 2。计算两个时间差值的函数,返回时间差的绝对值: 3。实现计算DateTime1-36天=DateTime2的功能 阅读全文
posted @ 2008-09-13 16:55 孙雅玲 阅读(1632) 评论(0) 推荐(0)

摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->string[] ps = txtPort.Text.Trim().Split(';');for(int i = 0 ; i class Program{ static void Main(st... 阅读全文
posted @ 2008-09-03 15:43 孙雅玲 阅读(3054) 评论(0) 推荐(0)

摘要:"abcdefg".substring(4,2) 返回的值为:ef 从字符串"abcdefg"中第4位开始取,取到第2位。 "abcdefg".substring(4) 返回:efg 从字符串"abcdefg"中第4位开始取,取到字符串的尾部 Code Code highlighting produced by Actipro CodeHighlighter (freeware) h... 阅读全文
posted @ 2008-08-20 09:54 孙雅玲 阅读(15706) 评论(0) 推荐(0)