码迷,mamicode.com
首页 > 其他好文 > 详细

List<Model>转String 、String 转List<string>

时间:2017-06-28 13:10:18      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:har   logs   tco   move   split   option   arp   rom   top   

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));

  

List<Model>转String 、String 转List<string>

标签:har   logs   tco   move   split   option   arp   rom   top   

原文地址:http://www.cnblogs.com/XuPengLB/p/7089097.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!