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