Dim stringSep() As String = {vbCrLf} sArray = sBunsho.Split(stringSep, StringSplitOptions.RemoveEmptyEntries)
'sBunsho が Nothing の時に、「sArray = New String(0) {""}」相当の結果にする場合 Dim sArray1() As String = If(sBunsho, "").Split({vbCrLf}, StringSplitOptions.None) Dim sArray2() As String = (sBunsho & "").Split({vbCrLf}, StringSplitOptions.None) Dim sArray3() As String = Strings.Split(sBunsho, vbCrLf)
'sBunsho が Nothing の時に、「sArray = New String(-1) {}」相当の結果にする場合 Dim sArray4() As String = If(sBunsho Is Nothing, New String(-1) {}, sBunsho.Split({vbCrLf}, StringSplitOptions.None)) Dim sArray5() As String = If(sBunsho?.Split({vbCrLf}, StringSplitOptions.None), New String(-1) {})
'sBunsho が Nothing の時に、「sArray = Nothing」相当の結果にする場合 Dim sArray6() As String = If(sBunsho Is Nothing, Nothing, sBunsho.Split({vbCrLf}, StringSplitOptions.None)) Dim sArray7() As String = sBunsho?.Split({vbCrLf}, StringSplitOptions.None)