这可能是我看不到的显而易见的东西。我的代码块是
static IEnumerable<char[][]> InnerGridgs(string[] outer, int height, int width)
{
if((outer.Length | outer[0].Length) == 0)
yield break;
char[][] G = StringArrayToCharMatrix(outer);
for(int i = 0, n = G.Length - height; i < n; ++i)
{
for(int j = 0, m = G[0].Length; j < m; ++j)
{
char[][] inner = new char[height][width];
for(int ii = 0; ii < height; ++ii)
{
for(int jj = 0; jj < width; ++jj)
{
inner[ii][jj] = G[i + ii][j + jj];
}
}
yield return inner;
}
}
}
并且编译器抱怨该行
char[][] inner = new char[height][width];
说
无法隐式转换类型
char' to
char [] []&#39;