Larry Brister
asked on
VB.Net remove from List
In my code below
In the "Else"
For each row if it makes it to the Else
Remove that row from the List
In the "Else"
For each row if it makes it to the Else
Remove that row from the List
Dim mtList As New List(Of Threading.Thread)
Private Sub getThreads()
Dim objThread As System.Threading.Thread
Dim i As Integer = 1
For Each objThread In mtList
If objThread.ThreadState.ToString() <> "Stopped" And Not objThread.Name.Contains("1111111111") Then
Dim tr As String = objThread.Name.ToString.Replace("]", "").Replace("[", "")
FileWriteline("C:\temp\threads.txt", "Thread(" + CStr(i) + ") " + "|" + tr.Substring(tr.Length - 10) + "|" + objThread.ThreadState.ToString() + ControlChars.Cr)
i = i + 1
Else
'Remove from List
End If
Next
FileWriteline("C:\temp\threads.txt", "Rows: " & CStr(mtList.Count))
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER