public class A
{
public string Key;
public string type;
public string objectvalue;
} public class B
{
ArrayList arrayList;
public B()
{
ArrayList arrayList =new ArrayList() ;
}
public bool Add(A pp)
{
bool haveA=false;
foreach(object cc in arrayList)
{
A ee= cc as A;
if((ee!=null)&&(ee.Key ==pp.Key ))
{haveA=true;
break;
}
}
if(haveA)
return !(haveA);
else 
{
arrayList.Add(pp);
return true;
}
}
}