VIsual Basic contains some useful functions not available in the .NET class library.
This post is about one of those functions, the Join(string array,string delimiter) function.
The Join function concatenates an array of strings into a delimited string using a specified delimiter.
Here is a method that includes the Join function:
Private Function GetDelimitedString(ByVal strings As String(), ByVal delimiter As String) As String
Return Join(strings, delimiter)
End Function
Here is an example that demonstrates using the method:
Dim strings As String() = {"red", "green", "blue"}
Console.WriteLine(GetDelimitedString(strings, ":"))
Result: red:green:blue