不废话直接看图
结果
代码:
this.txtListHTML.Text = String.Join(",", list.Replace(" ", ",").Split(',').Distinct()).Replace(",", " ");