I have a code:

```
    byte[][][] file = GetConfigData();

    if (file == null)
        return;

    int pages = 0;
    for (i = 0; i < file.Length; i++)
    {   
        if (file[i] != null)
        {   
            for (j = 0; j < file[i].Length; j++)
            {   
                if (file[i][j] != null)
                {
                    pages++;
                }
            }
        }
    }

```

How can I simplify it ?

Please, provide 2 versions:

1. for .net 2.0
2. for .net 3.5 (linq)