你可以找到如何去做 此处.简而言之就是:
you can find how to do it here.
In short it is:
public object this[int i]
{
get { return InnerList[i]; }
set { InnerList[i] = value; }
}
如果您只需要一个 getter,也可以使用答案中的语法(从 C# 6 开始).
If you only need a getter the syntax in answer below can be used as well (starting from C# 6).