I have a datatble with one column
I want to concat each filename with wrapper div
something like :
<div>File Attached : file1 </div>
<div>File Attached : file2 </div>
<div>File Attached : file3 </div>
...
I have succedded with :
string f = String.Join(" ", (from dr in dt.AsEnumerable()
select "<div>File Attached : " + dr[0].ToString() + "</div>").ToArray<string>());
but didnt success with :
https://i.stack.imgur.com/xCKLD.jpg

How can i do it with the .Join method after the ToArray method ?
Joinis not the same asString.Joinas you have discovered.Enumerable.Joinworks like joining in databases (but still on local objects, Queryable.Join works with SQL.) An example is given here:http://msdn.microsoft.com/en-us/library/bb534675.aspx
You could (but I don’t recommend it because it will be ambiguous to the user) write an extension method like this:
and then it would work with
(...).Join(" ").My solution: (4.0)
My solution: (3.5)