add unique Elements to List/HashSet of User defined class (i.e. List<Operand> )
<p>add unique Elements to List of User defined class (i.e. List )</p>

<pre><code>public class Operand: IEnumerable, IEnumerator
{ 
public String opr;
public String state;
}
</code></pre>

<p>i want made it and implement all necessary routines to apply List on it. 
(Note : class Operand: IEnumerable, IEnumerator )</p>

<p>but when i am Trying to add elements ie Operand 's object
operand tem1=new Operand("eax","undef");</p>

<pre><code>operand tem2=new Operand("ebx","undef");

operand tem3=new Operand("ecx","undef");

operand tem4=new Operand("eax","undef");
operand tem5=new Operand("eax","undef");
</code></pre>

<p>then i want to add these 5 temp[1-5] elements in List OR HashSet.
and if there is duplicate element the update the <strong>state</strong> of that element to Def i.e.Define</p>

<p>how do i do it...
please help me..</p>
