title: How to check if key pair in 2D array exists?
body: <p>I have this 2d array or struct</p>
  
  <pre><code>public struct MapCell
  {
      public string tile;
  }
  
  public MapCell[,] worldMap;
  </code></pre>
  
  <p>But there's no way to check if key pair is exists in this array or not... No methods for that available.</p>
  
  <p>I tried to do it like this</p>
  
  <pre><code>if (worldMap[tileX, tileY] != null) {
  }
  </code></pre>
  
  <p>it doesnt work:</p>
  
  <pre><code>Error 1 Operator '!=' cannot be applied to operands of type 'Warudo.MapCell' and '&lt;null&gt;'
  </code></pre>
  
  <p>and for</p>
  
  <pre><code>if (worldMap[tileX, tileY].tile != null) {
  </code></pre>
  
  <p>it doesn't work either (exception pops up when it hits non existing element).</p>
  
  <pre><code>Index was outside the bounds of the array.
  </code></pre>
  
  <p>So, how do I check if key pair is exists or not?</p>