IEnumerable to string

前端 未结 7 2263
既然无缘
既然无缘 2021-02-04 23:55

I have a DataTable that returns

IDs
,1
,2
,3
,4
,5
,100
,101

I want to convert this to single string value, i.e:

,1,2,3,4,5,100         


        
7条回答
  •  萌比男神i
    2021-02-05 00:30

    You can use MoreLINQ extension

    var singleString = _values.ToDelimitedString(",");
    

提交回复
热议问题