Passing one Dimension of a Two Dimensional Array in C#

后端 未结 6 937
耶瑟儿~
耶瑟儿~ 2021-01-21 07:31

I have moved from C to C#. I have a function which accepts an array. I want to pass one dimension of a Two Dimensional array to this function.

C Code would be:-

6条回答
  •  有刺的猬
    2021-01-21 07:42

    You could declare you array as

    int[][] Client_ID = new[] { new int[50], new int[50], new int[50] };
    

    and then you can pass it to your array_processing function

    array_processing(ref Clinet_ID[1]);
    

    Sorry for miss of my pen.

提交回复
热议问题