对于int 有个SUM,如果是个字符串,如何让查询出来的结果直接累加呢(中间加个<br/>),谢谢指导!~
好像没有用...
Datatable Ptime //
query = from s in ptime.AsEnumerable()
where s.Field<int>("phase")==1
select s;
如何返回 s.Field<int>("startime")列所有值累加"<br/>",成为一个string
string[] words ={"one","two","three"};
var res = words.Aggregate((current,next)=> current +", "+next);
Console.WriteLine(res);
改一下,就可以了。
string[] sum = { "1", "2", "3" };
var res = sum.Aggregate((value, text) => value + "<br/> "+text);