title: How to test if a string array is boolean
body: <p>I need to test for all values being only "0" or "1" in a string array and tried the following code without success:</p>
  
  <pre><code>bool isBool = Array.TrueForAll(str, val =&gt; val.Trim() == "0" || val.Trim() == "1");
  </code></pre>
  
  <p>and </p>
  
  <pre><code>bool isBool = str.All(val =&gt; val.Trim() == "0" || val.Trim() == "1");
  </code></pre>
  
  <p>Is there a different way I have to do this because I'm using a || condition?</p>