title: Check if string array contains non-empty strings without loop
body: <p>I have an If statement that checks a number of things (BaySlots() is an array of strings). </p>
  
  <pre><code>If (Not BaySlots.Contains(Not String.Empty)) OrElse
          (Not BayAcId = 0 AndAlso Not BayAcId = acProgramId _
              AndAlso overrideSetting = False) Then
  </code></pre>
  
  <p>I though the <code>Array.Contains</code> method of the first condition would be sufficient to tell me if the array held only empty strings, but it gives <code>InvalidCastException: Conversion from string "" to type Long is not valid</code> so I'm guessing <code>Not String.Empty</code> is actually evaluated to something that is attempted to be converted to a Long.</p>
  
  <p>Is there a better method I can use to retro-fit this If, so that I can still include the test for only empty strings in the array, as part of the If, rather than having to add a preceding loop to test each index of BaySlots() for an empty string?</p>
  
  <p>I thought there should probably be some way of testing this other than looping as that would be a relative lot of work just to test if there was no content.</p>
  
  <p>Thanks</p>
  
  <p>PS just to clarify this is not to test if the array has zero dimensions or is equal to Nothing but that the strings it does contain are all equal to String.Empty.</p>