摘要: 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 梦入神机 阅读(1342) 评论(0) 推荐(0) 编辑
摘要: 一、用属性代替可访问的字段 1、.NET数据绑定只支持数据绑定,使用属性可以获得数据绑定的好处; 2、在属性的get和set访问器重可使用lock添加多线程的支持。 二、readonly(运行时常量)和const(编译时常量) 1、const只可用于基元类型、枚举、字符串,而readonly则可... 阅读全文
posted @ 2014-11-04 14:30 梦入神机 阅读(1371) 评论(1) 推荐(1) 编辑
摘要: cmd ==> netsh winsock reset 阅读全文
posted @ 2014-11-01 14:18 梦入神机 阅读(285) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Drawing2D;using System.Linq;using System.Windows.Forms;namespa... 阅读全文
posted @ 2014-10-31 01:29 梦入神机 阅读(874) 评论(0) 推荐(0) 编辑
摘要: 对于GDI+,在正常的操作,Bitmap,Graphcis,DrawImage或者DrawString ,生成图片的话,会产生很多杂点,或者是图片质量不稳定..尤其是在读取图片后,生成缩略图之后,文件会被压缩而失真..主要原因是因为没有重新设置Graphics的几个属性..1.Graphics.Sm... 阅读全文
posted @ 2014-10-30 22:47 梦入神机 阅读(424) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Net;namespace ResumeConsoleApplication{... 阅读全文
posted @ 2014-10-27 15:13 梦入神机 阅读(286) 评论(0) 推荐(0) 编辑