Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Replace the following code with Linq syntax
- For i = 0 the list.count - 1
- If list(i) = "0" Then
- list.RemoveAt(j)
- End If
- Next
- Method 1
- list = list.Where(function(value) value <> "0").ToList
- Method 2
- list.RemoveAll(Function(o) o="0")
- Method 3
- List.RemoveAll(AddressOf TestFunction)
- Public Function TestFunction(ByVal item As String) As Boolean
- return item = "0"
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement