How to check whether an enum variable is assigned with a single enum value?
<p>I would like to restrict the user to use any of the enumvalue.if the user tries to assign more than two values,i have to throw an error.</p>

<pre><code>public enum Fruits
{
    Apple,
    Orange,
    Grapes
}

public Fruits Fruits
{
    get
    {
        return m_fruits;
    }
    set
    {
        m_fruits=value;
    }
}

Fruits = Fruits.Apple &amp; Fruits.Grapes; //I need to avoid such type of assignment
</code></pre>

<p>Can anyone say how to check this type of validation.</p>

<p>Thanks,
Lokesh</p>
