VB.net write to text file WITHOUT CrLf

I have to send a file to our EDI van, the record length is set to 80 characters, and there CANNOT be a CrLf after each line.

I am using VB.net (2008), using StreamWriter.  

Sample code:
        Dim addInfo2 As New System.IO.StreamWriter((yFileNameOut), True)
        Do While indEof = False
            If (yPosition_int + yLength_int) <= yStringLength_int Then
                yStringOut = yStringBuild.Substring(yPosition_int, yLength_int)
                addInfo2.WriteLine(yStringOut)
                yPosition_int = yPosition_int + 80 + yIndex_int
                yIndex_int = 0
            Else
                indEof = True
                If yPosition_int < yStringLength_int Then
                    yLength_int = yStringLength_int - yPosition_int
                    yStringOut = yStringBuild.Substring(yPosition_int, yLength_int)
                    addInfo2.WriteLine(yStringOut)
                End If
            End If

            If yPosition_int > yStringLength_int Then
                indEof = True
            End If
        Loop

By using WriteLine I get CrLf after each line to text file.  If I use Write instead, text file contains one long character string.

So question is how to write to text file (using VB.net), writing numerous lines, without CrLf at end of each line.
jhinsonAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

YZlatCommented:
What would you want to use instead of vbCrlf? A whitespace? In that case replace vbCrlf with a whitespace

I say use Write instead of WriteLine (because WriteLine automatically adds vbCrlf, and attach " " at the end of each written line:

addInfo2.Write(yStringOut & " ")

Open in new window

AndyAinscowFreelance programmer / ConsultantCommented:
>>writing numerous lines, without CrLf at end of each line.
Major problem there - the crlf denotes and end of line/start new line.

Just what is wrong with using write instead?  The app using this file (implied in your question) expects 80 char long records and barfs with the extra 2 chars you put in by using WriteLine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.