title: Is there another way to check if an array is empty
body: <p>I've added a condition that checks if an array is empty and automatically set an integer to larger than the size of the array since it's empty, but i get an &quot;Index was outside the bounds of the array.&quot; mesage instead</p>
  <pre><code>    public static bool hurdleJump(int[] hurdles, int jumpHeight)
      {
          int max = hurdles[0];
  
          if (hurdles == null &amp;&amp; hurdles.Length == 0)
          {
              return false;
          }
          else if (hurdles != null || hurdles.Length &gt;= 1)
          {
              for (int i = 0; i &lt; hurdles.Length - 1; i++)
              {
                  max = max &lt; hurdles[i+1] ? hurdles[i+1] : max;
              }
              if (jumpHeight &gt;= max)
              {
                  return true;
              }
          }
              return false;
      }
  
      static void Main(string[] args)
      {
          Console.WriteLine(hurdleJump(new int[] {}, 7));
      }
  </code></pre>