How to set Multiple bool flags based on an int counter without iterating?
<p>What is the best way to set my <code>boolean</code> properties based on an <code>int</code> counter property?</p>

<p>So, lets say I have 10 boolean properties</p>

<pre><code>public bool IsBool1 {get;set;}
....
public bool IsBool10 {get;set;}
</code></pre>

<p>and an int counter <strong>(which can never have a value greater than 10)</strong></p>

<pre><code>public int Counter {get;set;}
</code></pre>

<p>Finally, I have a method which sets the flags</p>

<pre><code>private void SetFlagsByCounter(int counter)
{
  if (counter &gt;= 1) { IsBool1 = true; }
  .....
  if (counter &gt;= 10) { IsBool10 = true; }
}
</code></pre>

<p>Is there a better way to set the flags instead of iterating the counter?</p>
