現在、これを使用して文字列配列を作成しています
New String() {" ", ".", ";"}
おそらく New String() 部分なしで、それほど多くの文字を必要としない別の方法はありますか?
コンパイラは通常、配列の要素から配列の型を推測できます。
Dim stringArray = {" ", ".", ";"}
注 - 調べる要素がないため、配列が空の場合、これは機能しません。
Dim stringArray = New String() {} ' specify the source type, infer the destination type
Dim stringArray As String() = {} ' specify the destination type, infer the source type
Dim stringArray = " . ".Cast(Of String)().ToArray()