Hi Nagarajan,
when you are adding the elements to the ArrayList call the method Contains to check if that element is already in the list. Add the element to said ArrayList only if it is not contained in the list. See my example code below:
pulic bool function AddIfNotContained(Object element, ArrayList list)
{
bool wasAdded = false;
if(!list.Contains(element))
{
list.Add(element);
wasAdded = true;
}
return wasAdded;
}
That should solve your problem.
Regards,
Manfred