在 C# 中接受二维列表的函数调用的语法
Syntax of a function call that accepts a 2D list in C#
我有点困惑。一个程序有一个二维列表:
List<int>field = new List<int>();
List<List>fieldSets = new List<List<int>>;
现在我想编写一些接受 fieldSets 作为输入并输出 int 或完全更新 fieldSets 的函数。
我的困惑是为 2D int List 编写函数调用的正确方法:
private int FindFirstCrossFieldMark (List<List< i>>) //<== ???
{
}
成功
List<List<int>> fieldSets = new List<List<int>>();
// or var fieldSets = new List<List<int>>(); would be enough
private int FindFirstCrossFieldMark (List<List<int>> listOflist)
{
}
我有点困惑。一个程序有一个二维列表:
List<int>field = new List<int>();
List<List>fieldSets = new List<List<int>>;
现在我想编写一些接受 fieldSets 作为输入并输出 int 或完全更新 fieldSets 的函数。
我的困惑是为 2D int List 编写函数调用的正确方法:
private int FindFirstCrossFieldMark (List<List< i>>) //<== ???
{
}
成功
List<List<int>> fieldSets = new List<List<int>>();
// or var fieldSets = new List<List<int>>(); would be enough
private int FindFirstCrossFieldMark (List<List<int>> listOflist)
{
}