I am using the spreadsheetlight library to access excel files.
How can I shorten the following construct through extension methods and lambda expressions ? I want to count all cells with boolean values.
Dictionary<int, Dictionary<int, SLCell>> cells = sl.GetCells();
int nCount = 0;
foreach (Dictionary<int, SLCell> Value in cells.Values)
{
foreach (SLCell Cell in Value.Values)
{
if (Cell.DataType == CellValues.Boolean)
{
nCount++;
}
}
}