当用VS2008自动创建一个类时都会包含一下几个空间命名:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
当用这份创建的类实现ICompare借口时,会提示你要使用IComparer<T>,实现这个借口后,如果你要实现ArrayList中的 Sort(ICompare comparer)时,你实现的这个 IComparer<T>泛型借口不能使用!因为ArrayList中的sort()不支持泛型
解决办法是用using System.Collection中的ICompare借口,而不用泛型!
//Person类
//测试类