c# see if list contains any duplicates

C#
var list = new List<string>();

// Fill the list

if(list.Count != list.Distinct().Count())
{
     // Duplicates exist
}
Source

Also in C#: