摘要: 标准数字格式字符串 格式说明符 名称 说明 C 或 c 货币 ... 阅读全文
posted @ 2006-07-04 11:24 蛤蟆 阅读(688) 评论(0) 推荐(0) 编辑
摘要: 假定:string str1 = "Summary dascription for Class";string str2 = "Summary description for Clas1";字符串是否为空检查:1. str1.Length == 0 快2. str1 == String.Empty 慢3. str1 == "" 差字符串相等比较:1. str1.Equals(str2) 快2. S... 阅读全文
posted @ 2006-06-23 17:05 蛤蟆 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.rainsts.net/article.asp?id=78在程序设计中我们经常会进行一些全局缓存设计,诸如使用静态或者全局根字段来引用某个对象,以便一次创建多次使用。如: class BigData { } class Program { static BigData cache; public static BigData DataCache... 阅读全文
posted @ 2006-06-12 11:58 蛤蟆 阅读(3320) 评论(3) 推荐(0) 编辑
摘要: 引用:http://www.7dspace.com/doc/24/0603/20063604160336160.htmhttp://www.yesky.com/20030311/1656401_1.shtmlMSDN垃圾回收专题:http://msdn2.microsoft.com/zh-cn/library/0xy59wtx.aspx一般在.NET程序中创建的托管对象,都是可以依靠GC来自动回收... 阅读全文
posted @ 2006-06-07 15:04 蛤蟆 阅读(513) 评论(0) 推荐(0) 编辑
摘要: 除非纯粹的类型检查,否则使用as转换比is快 // is 转换object obj = GetReferent();if (obj is SomeType){ SomeType st = (SomeType)obj; ..}// as 转换SomeType st = obj as SomeType;if (st != null){ ..} 阅读全文
posted @ 2006-06-07 14:20 蛤蟆 阅读(177) 评论(0) 推荐(0) 编辑
摘要: C#用委托来实现事件通知机制。对象开放事件,供调用者绑定事件处理函数。委托声明delegate void 函数名(参数表...); 事件声明event 委托类型 事件名; 阅读全文
posted @ 2006-06-07 14:08 蛤蟆 阅读(260) 评论(0) 推荐(0) 编辑
摘要: 示例代码: using System;class A{ public static int X; static A() { X = B.Y + 1; }}class B{ public static int Y = A.X + 1; static B() {} static void Main() { Console.WriteLine("X = {0}... 阅读全文
posted @ 2006-06-07 13:37 蛤蟆 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 直接插入排序的基本思想直接插入排序(Straight Insertion Sorting)的基本思想是:把n个待排序的元素看成为一个有序表和一个无序表,开始时有序表中只包含一个元素,无序表中包含有n-1个元素,排序过程中每次从无序表中取出第一个元素,将它插入到有序表中的适当位置,使之成为新的有序表,重复n-1次可完成排序过程。把a[i]插入到a[0],a[1],...,a[i-1]之中的具体实施过... 阅读全文
posted @ 2006-06-05 11:17 蛤蟆 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: CustomValidator 示例 不是偶数! 阅读全文
posted @ 2006-06-02 15:13 蛤蟆 阅读(647) 评论(0) 推荐(0) 编辑
摘要: Refers to: http://subversion.tigris.org/svn_1.3_releasenotes.html [*] 兼容性关注 - 命令行输出更改 - Berkeley DB 升级 [*] 新特性 - svnserve 通道授权(需要新服务器支持) - mod_dav_svn 操作日志记录(需要新服务器支持) - 主语言绑定改进... 阅读全文
posted @ 2006-05-31 10:03 蛤蟆 阅读(263) 评论(0) 推荐(0) 编辑