c# - Delimit concatenated columns -
i have following issue.
i receive sql stored procedure columns. after exporting them in xls
format in interface, log of info sql table after concatenating it. in c#
concatenate number of columns using string.format
method: ex:
string.format("{0}+{1}", "column1", "column2"); output: column1column2
i want able insert pipe or other character between columns. output shoul this:
column1|column2
this string.join
intended for.
string.join documentation on msdn
string[] columns = {"column1", "column2"}; string output = string.join("|", columns); //output contains : "column1|column2"
Comments
Post a Comment