Re: StreamWriter.Write and WriteLine?
From: Chris, Master of All Things Insignificant (chris_at_No_Spam_Please.com)
Date: 01/10/05
- Next message: Greg Burns: "Re: Easy question working with strings"
- Previous message: Chris, Master of All Things Insignificant: "Re: Easy question working with strings"
- In reply to: Nina: "StreamWriter.Write and WriteLine?"
- Next in thread: Nina: "Re: StreamWriter.Write and WriteLine?"
- Reply: Nina: "Re: StreamWriter.Write and WriteLine?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 10 Jan 2005 11:41:42 -0600
I may be misunderstanding your question, so ignore me if I am. You are
asking what WriteLine will do if the file can't handle the length of the
line to be written. I don't think this can happen. A line in a textfile is
just the first instance of CRLF. If there is not a CRLF then the line never
ends as far as the StreamReader is concerned. Can you explain an instance
that the string is too long for line to hold?
Chris
"Nina" <Nina@discussions.microsoft.com> wrote in message
news:11A08F7D-C27C-454C-8909-7D99C94E502B@microsoft.com...
> Hi there,
>
> What is the maximum length that one line can hold in a text file using
> StreamWriter's Write or WriteLine method? If the string is too long for
> one
> line to hold, what will Write or WriteLine do? In order me to retrieve
> data
> correctly from the text file later, I have to know the right index. For
> the
> following code,if str1's length exceeds one line in text file, how can I
> get
> str2's index when reading the text file? Is there any way to handle this
> kind of situation?
>
> ///
> dim sw as streamwriter
> dim str1, str2 as string
> sw.WriteLine(str1)
> sw.WriteLine(str2)
> \\\
>
> I appreciate your help.
>
> Nina
- Next message: Greg Burns: "Re: Easy question working with strings"
- Previous message: Chris, Master of All Things Insignificant: "Re: Easy question working with strings"
- In reply to: Nina: "StreamWriter.Write and WriteLine?"
- Next in thread: Nina: "Re: StreamWriter.Write and WriteLine?"
- Reply: Nina: "Re: StreamWriter.Write and WriteLine?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|