我已經從名單列表繼承的類上newing它實現一個索引應用索引從集合C#繼承
public class TwoDList<T>: List<List<T>>
{
public T this[int row, int column]
{
get;
set ;
}
}
,並使用它像這樣:
TwoDCollection<int> target = new TwoDCollection<int>();
var linearSequecValue = target[0, 2];
但我得到一個編譯時錯誤「沒有超載的方法」這個'需要2個參數「
TwoDList和TwoDCollection?錯字? –