public static ArrayList GenericToArrayList<T>(List<T> list)
{
ArrayList alist = new ArrayList();
foreach (T t in list)
{
alist.Add(t);
}
return alist;
}
public static Hashtable GenericToHashtable<TKey, TValue>(Dictionary<TKey, TValue> dic)
{
Hashtable ht = new Hashtable();
Dictionary<TKey, TValue>.Enumerator enumerator = dic.GetEnumerator();
while (enumerator.MoveNext())
{
ht.Add(enumerator.Current.Key, enumerator.Current.Value);
}
return ht;
}附:在VS2005中设置跟踪活动项。
选项-->项目和解决方案-->在解决方案资源管理器中跟踪活动项
