C#/코드

2차원 배열 크기구하기

어벙이 2020. 1. 15. 13:11

Object[,] excelRW.CellData;

 

for ( int y = 1; y <= excelRW.CellData.GetLength(0); y++)       // 1차 배열

{

for ( int x = 1; x <= excelRW.CellData.GetLength(1); x++)   // 2차 배열

{

          Console.Write("{0}", excelRW.CellData[y, x] + " ");

}

Console.Write("\r\n");

  }