title: Checking if an array is null or empty
body: <p>I need to validate if my string arrays are null or empty.Following is my code. Both don't work. Though the array is not initialized with any values it shows as if it contains values.Could somebody help please ?</p>
  
  <pre><code>string abc[] = new string[3];
  
  first code 
  
  if(abc != null)
  {
  
  }
  
  second code 
  
  if(IsNullOrEmpty(abc))
  {
  
  }
  
  public static bool IsNullOrEmpty&lt;T&gt;(T[] array)
  {
      return array == null || array.Length == 0;
  }
  </code></pre>