Array of fields of type bool
<p>I have 4 fields of type bool:</p>

<pre><code>private bool f1;
public bool F1 {
get{return this.f1;}
set
 {
 this.f1=value;
 onPropertyChanged("F1");
 }
}

private bool f2;
public bool F2 {
get{return this.f2;}
set
 {
  this.f2=value;
  onPropertyChanged("F2");
 }
}
private bool f3;
public bool F3 {
get{return this.f3;}
set
 {
 this.f3=value;
 onPropertyChanged("F3");
 }
}
private bool f4;
public bool F4 {
get{return this.f4;}
set
 {
  this.f4=value;
  onPropertyChanged("F4");
 }
}
</code></pre>

<p>Only one of them can be true. I want a way to set them in a for loop. I tried the following:</p>

<pre><code>bool[] myFields =
{
    F1,F2,F3,F4
};

int Answer = 1; 
for (int index = 0; index &lt; myFields.Length; index++)
{
    if(index == Answer)
    {
        myFields[index] = true;
    }
    else
    {
        myFields[index] = false;
    }
}
</code></pre>

<p>but this will only set the value in the myFields array to true/false and not the Property F2 itself. Any ideas on how to make this nicer / working ?</p>
