11 2014 档案

摘要:C#中有一个非常方便的求百分数的方法就是试用 ToString("P")例:Math.PI.ToString("P");得到的结果是316.16%;两个int类型相除求百分比int a = 1234; int b = 56789; double r1 = (double)a / b; ... 阅读全文
posted @ 2014-11-26 15:19 梦入神机 阅读(152) 评论(0) 推荐(0) 编辑
摘要:WebClient webClick = new WebClient(); webClick.DownloadFile("http://bcs.duapp.com/myresumedemo/%E7%96%AF%E7%8B%82%E7%9A%84%E7%A8%8B%E5%BA%8F%E5%91%98.... 阅读全文
posted @ 2014-11-18 15:14 梦入神机 阅读(228) 评论(0) 推荐(0) 编辑
摘要:1 string a = "33*33";2 string[] strarr = a.Split('*');3 int[] intarr = new int[strarr.Length];4 for (int i = 0; i < strarr.Length; i++)5 {6 intarr... 阅读全文
posted @ 2014-11-17 14:14 梦入神机 阅读(562) 评论(0) 推荐(0) 编辑
摘要:private void Form1_Load(object sender, EventArgs e) { var toolTip1 = new ToolTip(); toolTip1.AutoPopDelay = 10000; toolTip1.InitialDelay = 500; toolTi... 阅读全文
posted @ 2014-11-12 15:24 梦入神机 阅读(631) 评论(0) 推荐(0) 编辑
摘要:1、Math.Round(0.333333,2);//按照四舍五入的国际标准2、 double dbdata=0.335333; string str1=String.Format("{0:F}",dbdata);//默认为保留两位3、 float i=0.333333; i... 阅读全文
posted @ 2014-11-07 14:36 梦入神机 阅读(1352) 评论(0) 推荐(0) 编辑
摘要:一、用属性代替可访问的字段 1、.NET数据绑定只支持数据绑定,使用属性可以获得数据绑定的好处; 2、在属性的get和set访问器重可使用lock添加多线程的支持。 二、readonly(运行时常量)和const(编译时常量) 1、const只可用于基元类型、枚举、字符串,而readonly则可... 阅读全文
posted @ 2014-11-04 14:30 梦入神机 阅读(1388) 评论(1) 推荐(1) 编辑
摘要:cmd ==> netsh winsock reset 阅读全文
posted @ 2014-11-01 14:18 梦入神机 阅读(293) 评论(0) 推荐(0) 编辑