Guest User

Untitled

a guest
Aug 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Try
  2. Dim files() As String = IO.Directory.GetFiles("c:Data")
  3. Dim data As String = String.Empty
  4. For Each datafile As String In files
  5. Dim objTemp As Object
  6. Using stream As FileStream = File.OpenRead(datafile)
  7. objTemp = formatter.Deserialize(stream)
  8. Dim match As MyPerson = TryCast(Afis.Identify(probe, objTemp).FirstOrDefault(), MyPerson)
  9. If match Is Nothing Then
  10. Continue For
  11. Else
  12. Response.Write("Name:- " & match.Name)
  13. Exit For
  14. End If
  15. End Using
  16. Next
  17. Catch ex As Exception
  18. End Try
Add Comment
Please, Sign In to add comment