C#, How to tell if first element of array is null, when array could possibly have no elements?
<p>This code can throw a null pointer exception.</p>

<pre><code>if (myArray[0] != null)
{
    //Do Something
}
</code></pre>

<p>How can I test to make sure there is an element @ index <code>0</code>?
Without throwing an exception when the array is empty.</p>
