Passing one Dimension of a Two Dimensional Array in C#

后端 未结 6 940
耶瑟儿~
耶瑟儿~ 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:56

    You can use a jagged array

    // Initialize jagged array
    int[][] clientID = new int[3][];
    for (int i=0; i

    And your method:

    private void array_processing(ref int[] subArray);
    

提交回复
热议问题