摘要: 1、使用 Stopwatch 类 (System.Diagnostics.Stopwatch)Stopwatch 实例可以测量一个时间间隔的运行时间,也可以测量多个时间间隔的总运行时间。在典型的 Stopwatch 方案中,先调用 Start 方法,然后调用 Stop 方法,最后使用 Elapsed 属性检查运行时间。Stopwatch 实例或者在运行,或者已停止;使用 IsRunning 可以确定 Stopwatch 的当前状态。使用 Start 可以开始测量运行时间;使用 Stop 可以停止测量运行时间。通过属性 Elapsed、ElapsedMilliseconds 或 ElapsedT 阅读全文
posted @ 2011-05-24 11:46 Shikyoh 阅读(27480) 评论(2) 推荐(6) 编辑
摘要: using System;using System.Collections;using System.Collections.Generic;using System.Diagnostics;using System.Linq;namespace DictionaryTest{ class Program { private static int totalCount = 10000; static void Main(string[] args) { HashtableTest(); DictionaryTest(); SortedDictionaryTest(); Console.Read 阅读全文
posted @ 2011-05-24 11:21 Shikyoh 阅读(1185) 评论(0) 推荐(1) 编辑