https://blog.csdn.net/qq_40433102/article/details/83146473?utm_term=c#list有重复数据&utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2allsobaiduweb~default-1-83146473&spm=3001.4430
C#去除list中的重复数据
public void CompareList()
{
for (int i = 0; i < nickNameList.Count; i++)
{
for (int j = nickNameList.Count-1; j>i ; j--)
{
if (nickNameList[i] == nickNameList[j] )
{
nickNameList.RemoveAt(j);
}
}
}
}