I am trying to ouput a fix length data file from VB.NET and I am having trouble do it. as it keeps on adding a byte at the beginning of the data with the length of the outputed string
You are using a BinaryWriter and the Write does what it is documented to do.
"Writes a length-prefixed string to this stream in the current encoding of the BinaryWriter, and advances the current position of the stream in accordance with the encoding used and the specific characters being written to the stream."
Use a StreamWriter if you are wtring only Char or String.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.