LinQ/Listview.add Problem

  • VB.NET
  • .NET (FX) 4.5–4.8

    LinQ/Listview.add Problem

    Hallo zusammen

    Ich hab folgendes Problem, Ich habe ein listview und in diesen soll soll einzelne Wörter eingetragen werden.
    doch mein Problem ist Das es Zweimal Eingefügt wird

    Meine Frage ist Woher Kommt es und Wie behebe ich es , Natürlich könnte ich einfach alle doppelten items Löschen
    Spoiler anzeigen

    VB.NET-Quellcode

    1. Public Sub einlesen_der_Formdaten()
    2. Dim Eig As List(Of String) = Stunden()
    3. form.stunden = Eig(0) : form.facher = Eig(1)
    4. End Sub
    5. Private Function Stunden() As List(Of String)
    6. Dim entschluss = Function(wert As String) As String
    7. Dim jjjj As String = String.Empty
    8. For uu As Integer = 0 To wert.Length - 3
    9. If uu Mod (CInt(CStr(wert(wert.Length - 2)) & CStr(wert(wert.Length - 1)))) = 0 Then jjjj &= wert(uu)
    10. Next
    11. Return jjjj
    12. End Function
    13. Dim a As String = (entschluss(File.ReadAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Fromeig", "Stunden.danii"))))
    14. 'a = 10=Hallo;c
    15. Return a.Split("="c).ToList
    16. End Function
    17. Public Sub stundenplan_erstellen(a As ListView)
    18. form.facher.Split(";"c).ToList.ForEach(Sub(c) a.Items.Add(New ListViewItem() With {.Text = c}))
    19. End Sub