【ChengKing(ZhengJian)】

【ChengKing(ZhengJian)】

博客园 首页 联系 订阅 管理

文章分类 -  C#之Collection探讨

关于C#的集合相关知识
摘要:using System; namespace Array操作{ /// /// Class1 的摘要说明。 /// class Class1 { /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { // // TODO: 在此处添加代码以启动应用程序 // String[] ... 阅读全文
posted @ 2005-11-15 23:47 【ZhengJian】 阅读(547) 评论(0) 推荐(0)

摘要:using System;using System.Collections;using System.Collections.Specialized; namespace 集合和同步{ /// /// Class1 的摘要说明。 /// class Class1 { public static void DemoLockCollection() { StringDictionary s... 阅读全文
posted @ 2005-11-15 23:45 【ZhengJian】 阅读(327) 评论(0) 推荐(0)

摘要:using System;using System.Collections;using System.Collections.Specialized; namespace 集合的拷贝{ /// /// Class1 的摘要说明。 /// class Class1 { [STAThread] static void Main(string[] args) { NameValueCo... 阅读全文
posted @ 2005-11-15 23:44 【ZhengJian】 阅读(349) 评论(0) 推荐(0)

摘要:using System;using System.Collections; namespace 集合的比较和排序{ public class Efficience:IComparable { private int workHour; private int outPut; int IComparable.CompareTo(Object obj) { if(obj==null) ... 阅读全文
posted @ 2005-11-15 23:44 【ZhengJian】 阅读(782) 评论(0) 推荐(0)

摘要:(一).说明 将鼠标指向一幅图片的一块区域,此区域会放大显示,变清晰.用类: Graphics 实现. (二).代码 using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using... 阅读全文
posted @ 2005-11-15 23:42 【ZhengJian】 阅读(231) 评论(0) 推荐(0)

摘要:(一). 说明 1.继承IComparer接口,可以自定义比较器2.由于Array.Sort()方法接受IComparer参数,进行自定义排序规则. 示例中也将IComparer作为Sort方法的参数,将Icomparer应用于Array.Sort()方法 (二).示例代码 using System;using System.Collections; namespace 比较器ICompare... 阅读全文
posted @ 2005-11-15 23:37 【ZhengJian】 阅读(253) 评论(0) 推荐(0)

摘要:集合 ((I)).集合类型 1.一般集合 I.Array a.Array中的秩是Array中的维数.一个Array可以有一个或多个秩. Array具有固定的容量.如果有可变容量,则用Array.CreateInstance,其可以不从零开始存储. II.ArrayList集合类型 a.是... 阅读全文
posted @ 2005-11-15 23:27 【ZhengJian】 阅读(506) 评论(0) 推荐(0)