checking for duplicates in arraylist while adding C# windows form

i had a arraylist i want to add items to array list only if the items are not in the arraylist
so iam using the array list as follows
ArrayList  aL=new ArrayList ();
kranthi4uonlyAsked:
Who is Participating?
 
Daniel JungesConnect With a Mentor Commented:


           if (arrayList.Contains(myObj) == false)
            {
                arrayList.Add(myObj);
            }
0
 
JimBrandleyCommented:
Is this a duplicate of your previous question, or is there something different you need to do?

Jim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.