' Kod testowy .NET
Module Module1
    Dim WithEvents NetStr As New NetForExcel.NetString

    Sub Main()
        Dim ar() As String = {"Ten", "Tamten", "Inny"}
        Dim ar2(1, 1) As String, str As String = "Jakiś tekst dodatkowy"
        ar2(0, 0) = "Ten" : ar2(0, 1) = "Tamten" : ar2(1, 0) = "Inny"
        Console.WriteLine(NetStr.Join(ar, ", "))
        Console.WriteLine(NetStr.Sort(str, False))
        ' Spowodowanie błędu.
        Try
            NetStr.Join("Test, Tamten, Inny")
            NetStr.Join(ar2)
            NetStr.Split(str, " r")
        Catch ex As Exception
            Console.WriteLine("Błąd: " & ex.Message)
        End Try
        ' Oczekiwanie na wciśnięcie klawisza Enter.
        Console.Read()
    End Sub

    Private Sub NetStr_Sorted(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles NetStr.Sorted
        Console.WriteLine("Zdarzenie sortowania zakończone. Wynik: " & NetStr.Value)
    End Sub
End Module
