.NET 4.0 will come soon, let’s review what is new in .net 3.0
摘要:* Automatically Implemented Properties * Object and Collection Initializers * Implicitly Typed Local Variables and Implicitly Typed Arrays * Extending Types with Extension Methods * Lambda Expressions...
阅读全文
posted @
2009-06-12 15:32
Jack Niu
阅读(398)
推荐(0)
[C#] Format a XML string using XmlTextWriter
摘要:// a demo stringstring xml = "<Root><Eles><Ele>abc</Ele><Ele>123</Ele></Eles></Root>";System.Xml.XmlDocument doc = new System.Xml.XmlDocument();doc.Load...
阅读全文
posted @
2009-05-09 10:48
Jack Niu
阅读(1304)
推荐(0)
[原创]C#通过引用Office Excel (2007) 组件实现对Excel文件的操作
摘要:对用应用软件来说,将报表转出为Excel文件,进行二次加工,或者根据Excel模版填充数据,是非常常用的。实现对Excel文件的操作,如将报表转出为Excel或根据已有的Excel模版进行填充,有很多
阅读全文
posted @
2008-06-16 13:20
Jack Niu
阅读(7843)
推荐(1)
有意思的Convert.ToInt32方法,不清楚的话会出问题的!
摘要:Convert.ToInt32将带小数的数值转换为整数,紧紧是四舍五入吗? Console.WriteLine(Convert.ToInt32(5.5));Console.WriteLine(Convert.ToInt32(6.5)); 你觉得输出的结果是6、7吗?试试看,是6、6!! Why??原来,对于x.5这种数,使用Convert.ToInt32转换时,返回的是其两个边界整数中为偶数的那个...
阅读全文
posted @
2008-03-26 14:16
Jack Niu
阅读(1635)
推荐(0)
在VS.NET中使用clickonce技术开发Winform程序
摘要:做为程序员,我们经常要面对的是对开发模式的选择,比如C/S模式和b/s模式。现在,很多人都似乎比较喜欢选择B/S模式进行web的开发,这其中的原因是很多的。但其中一点很重要的原因,那就是因为B/S开发的话,部署非常之容易,因为这样很容易实现"瘦客户端",客户端只需要使用浏览器就可以运行应用了。但B/S模式下开发的WEB应用,也有其不足之处,主要是由于功能实现起来,是没办法和传统的C/S模式下的wi...
阅读全文
posted @
2007-12-24 13:28
Jack Niu
阅读(1599)
推荐(0)
DateTime.Now.ToString 中的参数问题
摘要:DateTime.Now.ToString根据参数不同输出不同内容,功能很强的,总结一下。 [C#] using System;using System.Globalization; public class MainClass { public static void Main(string[] args) { DateTime dt = DateTime.Now; ...
阅读全文
posted @
2007-12-06 10:50
Jack Niu
阅读(1155)
推荐(0)