C# 字符串去重 还有 去除最后一位逗号。 a = a.Substring(0, a.Length - 1); //去除最后一位逗号 b = string.Join(",", a.Split(',').Distinct().ToArray());//去字符串去重