为什么我得到"不能隐式转换类型`char'到`char [] []'"这里?

时间:2017-02-07 15:58:55

标签: c#

这可能是我看不到的显而易见的东西。我的代码块是

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;

0 个答案:

没有答案