NPOI.XSSF.UserModel.XSSFWorkbook.ValidateSheetIndex C# (CSharp) Method

ValidateSheetIndex() private method

private ValidateSheetIndex ( int index ) : void
index int
return void
        private void ValidateSheetIndex(int index)
        {
            int lastSheetIx = sheets.Count - 1;
            if (index < 0 || index > lastSheetIx)
            {
                String range = "(0.." + lastSheetIx + ")";
                if (lastSheetIx == -1)
                {
                    range = "(no sheets)";
                }
                throw new ArgumentException("Sheet index ("
                        + index + ") is out of range " + range);
            }
        }