C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
Result: We can see the result of the program is the String "Dot.Net.Perls".
Note: No characters come before or after the String value. String.Join does not add the separator character after the final element.
JoinVB.NET program that converts array to string
Module Module1
Sub Main()
' Input array.
Dim array() As String = {"Dot", "Net", "Perls"}
' Convert to String data.
Dim value As String = String.Join(".", array)
' Write to screen.
Console.WriteLine("[{0}]", value)
End Sub
End Module
Output
[Dot.Net.Perls]
However: The trailing separator is usually not required in my experience. It sometimes even causes problems.
StringBuilderTip: If more flexibility is required, an imperative approach—looping and calling StringBuilder's Append function—could be used.