C#
文章平均质量分 79
fenglei_lyg
这个作者很懒,什么都没留下…
展开
-
asp.net上传图片并判断是否存在限制图片大小
public bool Upload() { string username = HttpContext.Current.User.Identity.Name; string file = fldPhoto.FileName; // if (file.Length == 0) {转载 2012-01-18 10:19:21 · 884 阅读 · 0 评论 -
C#中的数字格式化 格式日期格式化
2008-03-26”日期格式、“28.20”数字格式。 举一个例子,我们有时需要将订单号“12”显示为“00000012”这种样式(不足8位前面补0),就可以使用下面的方法: int originalCode = 12; Response.Write(string.Format("{0:00000000}", originalCode)); 或者转载 2012-01-19 08:53:34 · 583 阅读 · 0 评论 -
C#构造函数实例
using System; class A { public static int X; static A() { X = B.Y + 1; Console.WriteLine("static A()"); } } class B { public static int Y = A.X + 1;翻译 2012-02-04 09:45:52 · 699 阅读 · 0 评论