2011年10月14日

C# 下 System.Collections 简介

摘要: System.Collections命名空间包含可使用的集合类和相关的接口。该命名空间下的.NET非泛型集合类如下所示:— System.Collections.ArrayList:数组集合类,使用大小可按动态增加的数组实现Ilist接口。— System.Collections.BitArray:布尔集合类,管理位值的压缩数组,该值为布尔值。— System.Collections.Queue:队列,表示对象的先进先出集合。— System.Collections.Stack:堆栈,表示对象的简单的后进先出集合。— System.Collections.Hashtable:哈希表,表示键/值 阅读全文

posted @ 2011-10-14 12:20 Delphi2010_老赵 阅读(1270) 评论(0) 推荐(0) 编辑

C# 动态数组 ArrayList 介绍范例。

摘要: ArrayList是一种动态数组,其容量可随着我们的需要自动进行扩充.ArrayList位于System.Collections命名空间中,所以我们在使用时,需要导入此命名空间.下面,我们还是在Student类的基础上利用ArrayList操作,从而了解ArrayList的用法public class Student { public Student(){} public Student(String name,int age,String hobby) { ... 阅读全文

posted @ 2011-10-14 12:17 Delphi2010_老赵 阅读(553) 评论(0) 推荐(0) 编辑

C# 在 WinCe 下如何让程序全屏。

摘要: using System.Runtime.InteropServices;============================= public class FullScreenClass { public const int SPI_SETWORKAREA = 47; public const int SPI_GETWORKAREA = 48; public const int SW_HIDE = 0x00; public const int SW_SHOW = 0x0001; public const in... 阅读全文

posted @ 2011-10-14 12:14 Delphi2010_老赵 阅读(1197) 评论(0) 推荐(0) 编辑

C# ArrayList的用法

摘要: C# ArrayList的用法System.Collections.ArrayList类是一个特殊的数组。通过添加和删除元素,就可以动态改变数组的长度。一、优点1. 支持自动改变大小的功能2. 可以灵活的插入元素3. 可以灵活的删除元素4. 可以灵活访问元素二、局限性跟一般的数组比起来,速度上差些三、添加元素1.public virtual int Add(object value);将对象添加到ArrayList的结尾处ArrayList aList=new ArrayList();aList.Add("a");aList.Add("b");aList 阅读全文

posted @ 2011-10-14 12:11 Delphi2010_老赵 阅读(394) 评论(0) 推荐(0) 编辑

导航