Kasuni Abegunawardana

Kasuni Abegunawardana

  • NA
  • 211
  • 125.5k

multidimensional array select corner numbers C#

Jul 24 2021 4:39 PM

Hi All,

I have a question regarding  multidimensional array.
  int[,] arr = {    {1,2,3,4},  {5,6,7,8}, {9,10,11,12},{13,14,15,16}    };

1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

need to get the yellow color numbers and blue color numbers as separated outputs using nested for loop in C#.
Thank you in advanced.


Answers (2)