title: How to check if all the elements in an array are positive integers?
body: <p>I have an array, say </p>
  
  <pre><code>int[] array = new int[] { 1, 5, 11, 5 };
  </code></pre>
  
  <p>How can I check (in the most easy and efficient way) that all elements are positive? If at least one number is not a positive integer, the system will respond in a negative  way.</p>
  
  <p><strong>Desired output:</strong></p>
  
  <p>if all the numbers are positive, then it will display "All Positive" else "Wrong"</p>
  
  <p><strong>My shot</strong></p>
  
  <pre><code>int[] array = new int[] { 1, 5, 11, 5 };
  var x = array.All(c =&gt; c &gt;= '0' &amp;&amp; c &lt;= '9');
  if (x == true) "Positive" else "Wrong";
  </code></pre>