Advertisement
calfred2808

read texr file

Jun 11th, 2017
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.37 KB | None | 0 0
  1. Imports System.IO
  2.  
  3. Public Async Function ReadNow() As Task
  4.             Try
  5.                 Using sr As StreamReader = New StreamReader("binX\cmd.text")
  6.                     Dim line = Await sr.ReadToEndAsync()
  7.                     MsgBox(line)
  8.                 End Using
  9.             Catch
  10.                 MsgBox("An error occured")
  11.             End Try
  12.         End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement