■ 행 수를 구하는 방법을 보여준다.
▶ 행 수 구하기 예제 (C#)
1 2 3 4 5 6 7 |
using System; int rowCount = GetRowCount(75, 10); Console.WriteLine(rowCount); |
▶ 행 수 구하기 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
#region 행 수 구하기 - GetRowCount(totalCount, columnCount) /// <summary> /// 행 수 구하기 /// </summary> /// <param name="totalCount">전체 수</param> /// <param name="columnCount">컬럼 수</param> /// <returns>행 수</returns> public int GetRowCount(int totalCount, int columnCount) { return (totalCount + columnCount - 1) / columnCount; } #endregion |