Add single quote and comma

hi all,

How would i add single quotes and comma to each string array to seperate them?

It needs to look like this ‘27823004994’, ‘27823013168’, ‘27823581488’, ‘27716075460’, ‘27827759311’



Use the string replace method.

Like this:

YourString.Replace(" ", “’, ‘”)

1 Like

have a look here on the quick done samples:


String.Format("’{0}’",“A B C”.replace(" ", “’,’”))
surrounding the string with ', replaced space with ‘,’

“A B C”.Split({" "}, StringSplitOptions.RemoveEmptyEntries)
Splitting a string into a string array - arrSplits

with the combination:

the splitt array can be decorated as above first example

1 Like

This worked perfectly. Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.