Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. Private Function Createlog(ByVal mylist As List(Of classTest))
  2. Dim sw As New StreamWriter("log_list.log")
  3. For index = 1 To mylist.Count - 1
  4. sw.WriteLine(mylist(index).comments)
  5. Next
  6. sw.Close()
  7. Try
  8. Me.Invoke(UpdateLabel("Log sucessfully saved"))
  9. Catch ex As Exception
  10.  
  11. End Try
  12. Return 1
  13. End Function
  14.  
  15. Private Function UpdateLabel(ByVal text As String)
  16. Label1.Text = text
  17. Return 1
  18. End Function
  19.  
  20. Dim tasktest = Task(Of Integer).Factory.StartNew(Function() Createlog(theList))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement