Salve a tutti....
utilizzo una funzione per estrapolare delle stringhe da un file.txt....
uso come "discriminante" delle stringhe data....
se nel file.txt c'è la stringa con il valore data che passo alla funzione. allora estrpolami la stringa...
io quindi, passo alla funzione il nome del file, e l'array contenete le date....
usando
for each d as string in ArrData
msgbox(d.tostring)
next
riesco a vedere le date
devo implementare questo alla mia funzione....
come faccio???
in teoria dopo il primo for each dovrei mettere il for each che mi estra i valori
data, ma nn mi funziona.... aiuto!!!
grazie
codice:
Public Function GetDatesPe(ByVal FileName As String, ByVal ArrData() As String) As Generic.List(Of String)
Dim RetValue As New Generic.List(Of String)
Dim stringhe As String
Dim f As New Form1
Dim Lines() As String = My.Computer.FileSystem.ReadAllText(FileName).Split(Environment.NewLine)
For Each d As String In ArrData
MsgBox(d.ToString)
Next
For Each s As String In Lines
Try
If s.Contains("Music Start: " & ArrData()) Then
s.StartsWith("Channel")
stringhe = (s & vbCrLf)
If Not RetValue.Contains(stringhe) Then
RetValue.Add(stringhe)
End If
Else
End If
Catch ex As Exception
End Try
Next
Return RetValue
End Function