Check if any object in a 2d array is null

Posted by Stefan Monov on Stack Overflow See other posts from Stack Overflow or by Stefan Monov
Published on 2010-04-04T10:12:03Z Indexed on 2010/04/04 10:13 UTC
Read the original article Hit count: 476

Filed under:
|
|

I've got an array var cells = new Cell[w, h], can I loop through all cells without a nested for-loop (I want to check if at least one is null)? Ideally I'd want to write something like Debug.Assert(!cells.Contains(null)).

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about c#