I have a Stack<string>
that I'm processing but sometimes I can't process all elements and would like to join/concatenate the remaining stack elements into one string. Is there an existing function or will I need to pop all elements in a loop and append them to a string variable?
Try using the String.Join function to concatenate a few objects into a single string.