hi
Am using the following code to search a textfile.The returned value will always be found in this case, is there any problem in the code??
[CODE=vbnet]Dim list As System.Collecti ons.ObjectModel .ReadOnlyCollec tion _
(Of String)
list = My.Computer.Fil eSystem.FindInF iles("C:\Find", _
Search.Text, True, FileIO.SearchOp tion.SearchTopL evelOnly)
Dim i As Integer = 0
For Each name As String In list
RichTextBox1.Te xt = "(" & StringSearch.Te xt & ")" & " " & "Found" & " " & name
i = 1
' StatusText = " Found "
Next
If i = 0 Then
' StatusText = " Not Found "
RichTextBox1.Te xt = StringSearch.Te xt & " " & " Not Found"
End If[/CODE]
Am using the following code to search a textfile.The returned value will always be found in this case, is there any problem in the code??
[CODE=vbnet]Dim list As System.Collecti ons.ObjectModel .ReadOnlyCollec tion _
(Of String)
list = My.Computer.Fil eSystem.FindInF iles("C:\Find", _
Search.Text, True, FileIO.SearchOp tion.SearchTopL evelOnly)
Dim i As Integer = 0
For Each name As String In list
RichTextBox1.Te xt = "(" & StringSearch.Te xt & ")" & " " & "Found" & " " & name
i = 1
' StatusText = " Found "
Next
If i = 0 Then
' StatusText = " Not Found "
RichTextBox1.Te xt = StringSearch.Te xt & " " & " Not Found"
End If[/CODE]
Comment