I have this code:
foreach (var node in nodes)
{
result += node.InnerText;
}
The InnerText
is simply 1-2 characters that never contain the #
symbol. There can be one or more values of node in nodes.
How can I delimit each of these so that, for example, if these were the values of node:
"ab" and "cd"
That the result would be ab#cd
.
I know I can just add #
to the value but then what about the last character. If I just did simple adding of #
then I would get ab#cd#
which is not what I want.