Re: file access with VB.NET
From: Dave Cullen (no_spam_at_mail.com)
Date: 06/29/04
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: find word(s) in string"
- Previous message: SStory: "Fill Image in odd shape"
- In reply to: Rulin Hong: "RE: file access with VB.NET"
- Next in thread: Rulin Hong: "Re: file access with VB.NET"
- Reply: Rulin Hong: "Re: file access with VB.NET"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 29 Jun 2004 14:35:12 -0400
ReadToEnd reads the whole file, not parsed by delimiter.
Thanks anyway.
Rulin Hong wrote:
>
> Private Sub Read()
> 'Read
> If System.IO.File.Exists("FileName") Then
> Dim myFileStream As System.IO.FileStream = System.IO.File.OpenRead("FileName")
> Dim myStreamReader As New System.IO.StreamReader(myFileStream)
> Dim myStr As String = myStreamReader.ReadToEnd
> myStreamReader.Close()
> End If
> End Sub
>
> Private Sub Write()
> 'Write
> Dim myFileStream As New System.IO.FileStream("FileName", IO.FileMode.OpenOrCreate)
> Dim myStreamWriter As New System.IO.StreamWriter(myFileStream)
> Dim myStr As String = "Sample string"
> myStreamWriter.WriteLine(myStr)
> myStreamWriter.Close()
> End Sub
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: find word(s) in string"
- Previous message: SStory: "Fill Image in odd shape"
- In reply to: Rulin Hong: "RE: file access with VB.NET"
- Next in thread: Rulin Hong: "Re: file access with VB.NET"
- Reply: Rulin Hong: "Re: file access with VB.NET"
- Messages sorted by: [ date ] [ thread ]