using System;using System.Collections.Generic;public class SiteList
{ protected SortedList<int, string> sites; //其他成员函数
public string this[int index]
{ get
{ if(index>sites.Count) return (string)null; return (string)sites.GetByIndex(inex)
}
} //其他东西 }这里VS提示“找不到GetByIndex的定义”,但是如果把using 中的Generic去掉的话,原来的“找不到定义”消失,却又提示“非泛型 类型“System.Collections.SortedList”不能与类型实参一起使用”,难道带参数的SortedList不是继承不带参数的SortedList吗?
幕布斯6054654
ABOUTYOU
随时随地看视频慕课网APP