06 2014 档案
摘要:Once again, in this series of posts I look at the parts of the .NET Framework that may seem trivial, but can help improve your code by making it easier to write and maintain. The index of all my past ...
阅读全文
摘要:WPF是个用户控件,被WinForm调用。而WinForm是在一个DLL类库中被调用。试了很多方法,都无法将Resource中的图读进程序。用下面的方法总算实现了。 /根据图片的名称,从资源中找到它 public static System.Drawing.Bitmap GetPngFromResources(string pngName) { ...
阅读全文
摘要:下面代码很好的解释了它们之间的区别: ...
阅读全文
摘要:用 System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();watch.Start();for (int i = 0; i "000" + x);//Linq,返回IEnumerable}watch.Stop();
阅读全文
摘要:编译项目,出现提示"Lc.exe已退出,代码为-1" 。 解决办法: 意思就是把licenses.licx这个文件里的内容删除,但是文件还在(此时是个空文件),发生这个问题的原因主要是因为你可能引用了第三方控件但没有注册,删完后,重新编译就一切OK了!
阅读全文
摘要:对于enum类型:使用foreach遍历enum类型的元素并填充comboxforeach ( HatchStyle hs1 in Enum.GetValues(typeof(HatchStyle))) { comboBox1.Items.Add(hs1.ToString()); }From...
阅读全文
摘要:我现在是这么画的,class A { private GeometryGroup _lines; private Path _path; public A() { _path.Data = _lines; } public Draw() { LineGeometry line = new LineGeometr...
阅读全文

浙公网安备 33010602011771号