摘要: 排序10000个数字的数组,看看冒泡和Sort()的速度比较:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Diagnostics;namespace StopWatch{ class CArray { static void Main(string[] args) { CArray nums = new CArray(10000); List<int> nums2 =... 阅读全文
posted @ 2012-05-31 17:45 flytothemoon 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 委托用于将方法作为参数传递给其他方法,委托应用的示例:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace DelegateApp{ public class Person { public string Name { get; set; } public int Age { get; set; } } class Program { //定义FILTER委托 publ... 阅读全文
posted @ 2012-05-31 13:58 flytothemoon 阅读(377) 评论(0) 推荐(0) 编辑