摘要: 哈希表Hashtable是一个重要的集合类型,下面我来对他的基本用法做个小小的总结。1、Hashtable的概述Hashtable它表示键/值对的集合,这些键/值对根据键的哈希代码进行组织。它的每个元素都是一个存储在DictionaryEntry对象中的键/值对,键不能为空引用,但值可以。Hashtable常用的两种构造函数:public Hashtable() public Hashtable(... 阅读全文
posted @ 2010-04-05 09:53 魄力 阅读(3872) 评论(1) 推荐(0) 编辑
摘要: ArrayList类位于System.Collections命名空间下,它可以动态的添加和删除元素,可以将它看为扩充了的功能数组,但是却不等同于数组。那么ArrayList类与数组相比会有哪些不同呢?·数组的容量是固定的,而ArrayList类的容量是可以根据需要自动扩充。·ArrayList类提供添加、删除和插入某一范围元素的方法,但在数组中只能一次获取或设置一个元素... 阅读全文
posted @ 2010-04-05 09:24 魄力 阅读(1522) 评论(0) 推荐(1) 编辑
摘要: Three businessmen were having dinner at a club. When it came time to pay the check, each grabbed for it."It's a business expense," said one."I'll pay," said the second. "I'm on cost plus.""let me have... 阅读全文
posted @ 2010-04-02 08:20 魄力 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 今天来介绍一下C#中遍历排序的方法,今天就介绍下冒泡法,直接插入法和选择排序法。1、冒泡法题目:使用冒泡法对数组中的元素从小到大进行排序。方法一:int[] arr = new int[] { 3, 9, 27, 6, 18, 12, 21, 15 }; foreach (int m in arr) { Console.Write(m + " "); } Console.WriteLine();... 阅读全文
posted @ 2010-03-31 20:57 魄力 阅读(1079) 评论(0) 推荐(0) 编辑
摘要: To impress his date, the young man took her to a very chic Italian restaurant. After sipping some fine wine, he picked up the menu and ordered. "We'll have the giuseppe spomdalucci," he said.  "Sorry ... 阅读全文
posted @ 2010-03-31 07:59 魄力 阅读(253) 评论(0) 推荐(0) 编辑
摘要: A New York City divorce lawyer died and came before St.peter.  "What exactly have you done to earn eternal happiness?" St.Peter said.  The lawyer recalled that he had given a bum on the street a quart... 阅读全文
posted @ 2010-03-28 19:19 魄力 阅读(347) 评论(0) 推荐(0) 编辑
摘要: The news isn't good when a guy visits the doctor for his annual checkup. "You're got to do something to improve your health," the doctor says.  "What?" the patient asks.  "I recommend walking or joggi... 阅读全文
posted @ 2010-03-28 11:22 魄力 阅读(219) 评论(0) 推荐(0) 编辑
摘要: String对象是不可改变的,每次使用String类中的方法时,都要在内存中创建一个新的字符串对象,这就需要为该新对象分配新的空间。在需要对字符串执行重复修改的情况下,与创建新的String对象相关的系统开销可能会非常昂贵。如果要修改字符串而不创建新的对象,则可使用StringBuilder类。  对于String类我就不想举例了,使用的很普遍。对于像我这样的初学者来说,StringBuilder... 阅读全文
posted @ 2010-03-28 11:10 魄力 阅读(1384) 评论(0) 推荐(1) 编辑
摘要: 大家好,我是denylau,今天很郁闷了,本来整理了好多关于变量的咨询眼看就要写完了,电脑出现异常,所有的一切白做了,这个我时候我就纳闷了,为什么blog在发表文章前的写的这么多的东西我无法暂存起来呢?一旦浏览器出现问题,所有的就是徒劳的额,希望以后的blog能够增加一个暂存功能,我写一行点个暂存,及时关闭浏览器再次打开的时候也是可以直接查看的。多好,草稿相对比较麻烦。  好了,下面还是重新的整理... 阅读全文
posted @ 2010-03-27 16:29 魄力 阅读(1905) 评论(0) 推荐(1) 编辑
摘要: 导读:美国IT网站Computer World专栏作家普雷斯顿格拉拉(Preston Gralla)今天撰文,列举了微软创立35年来的一系列重大事件。以下为文章概要:1975年,刚刚从哈佛大学退学的比尔盖茨(Bill Gates)和他在高中时的好友保罗艾伦(Paul Allen)一起创建了一家小公司,专门为一款名为Altair 8800的微型计算机编写软件。他们的第一款产品名为Altair BAS... 阅读全文
posted @ 2010-03-26 10:30 魄力 阅读(252) 评论(0) 推荐(0) 编辑