Passing 2D part of a 3D multidimensional array as a 2D method parameter array in C#

Posted by Ricardo Inácio on Stack Overflow See other posts from Stack Overflow or by Ricardo Inácio
Published on 2010-05-04T00:56:15Z Indexed on 2010/05/04 0:58 UTC
Read the original article Hit count: 557

What I would like to do in my code is something like that below:

static class MyClass
{
    static byte[,,] array3d = { { {0,0},{0,0}},{{0,0},{0,0}}};

    static MyClass()
    {
        someMethod(array3d[0]);
        someMethod(array3d[1]);
    }

    static void someMethod(byte[,])
    {
    }
}

I would like to know if there is some way to do what I am trying to when calling someMethod(). If not, what should I do?

© Stack Overflow or respective owner

Related posts about c#

Related posts about multidimensional-array