List<Model>转String 、String 转List<string>
var ltCode = from item in psw.VehicleInsuranceItem select item.Code; string code = string.Join("|", ltCode.ToArray()); string 转List<string> List<string> ltCodes = new List<string>(System.Text.RegularExpressions.Regex.Split(code, "|")); List<string> ltCodes = new List<string>(code.Split(new string[] { ", " }, StringSplitOptions.RemoveEmptyEntries));