C#:Join String

From Progzoo
Jump to navigation Jump to search

The + operator can be used to join two strings:

"one" + "two"  -> "onetwo"

The Join function can be used to concatenate elements of an array. So is s is the String array {"one","two","three","four"}

String.Join("/",s) -> one/two/three/four


You can join an array of strings using the static method Join

[Font] [Default] [Show] [Resize] [History] [Profile]


You may include the index of the first element to include and the number of items to include.

[Font] [Default] [Show] [Resize] [History] [Profile]