Dim words As String = _
"this is a list of words, with: a bit of punctuation."
Dim split As String() = _
words.Split(New Char() {" ", ",", ".", ":"})
VB.NETによるSplitメソッドの呼び出し例
string words =
"this is a list of words, with: a bit of punctuation.";
string [] split = words.Split(new Char [] {' ', ',', '.', ':'});
C#によるSplitメソッドの呼び出し例
これらの呼び出しでは、文字(Char型の値)の配列を作成し、それをパラメータとしてSplitメソッドに渡している(これにより、「this is a list of words, with: a bit of punctuation.」という文字列を「 」(半角空白)や「,」、「.」、「:」という指定文字列で分割している。)。