1, when the fight sql statement, list elements in single quotes and separated by commas: string.Join ( ",", list.Select (r => " '" + r + "'"))
2, string str = " '" + r + "',"; list.Trim ( ","); // TrimEnd ( ',') to remove the last comma
3、string[] arr=str.split(','); string[] arrTest = arr.Distinct().ToArray();