public static void Main()
var targetCountPerRow = 0;
for (var i = 0; i < numbers.GetLength(0); i++)
for (var j = 0; j < numbers.GetLength(numbers.Rank - 1); j++)
{if (numbers[i, j] == targetNumber)
if (count < targetCountPerRow)
targetCountPerRow = count;
Console.WriteLine("The index of row with maximum numbers of 1 is: {0 }", rowIndex);