Check Duplicate in List of structure


I have one structure named Company[id,name] and i am appending three different company in List of Company Structure but if i will append two company with same name in list then how can i find the duplicate company in List of company ?

Thanks & Regards

DM Singh

sorting by name and simply check current with previous for example.

if you store them in the database, just do a aggregate by name and then check on id...