Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
im having a stupid problem. im trying to open a file using vb .net. im trying to use file.openfile and it is saying file is not declared, or i get a message that says openfile is not part of string. what do i declare to get this to work? thanks for your help.
  • *Experts*
Posted

Use a stream reader to open a file.

Dim reader As New System.IO.StreamReader("pathtofile")
'do thing like realine, readtoend...
reader.ReadLine()
reader.ReadtoEnd()

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...