burnt1ce85
04-10-2007, 04:19 PM
Hey guys.
I'm trying to write a c# program that downloads a xml file, and reads it into an array of bytes.
My problem is before i can get the BinaryReader to read the xml file, i have to specify how many bytes to read. Usually, i would use Response.ContentLength but in some cases it's equal to -1. According to google searches, ContentLength is optional and in this case, i have to calculate it myself.
How do i calculate ContentLength?
Thanks
I'm trying to write a c# program that downloads a xml file, and reads it into an array of bytes.
My problem is before i can get the BinaryReader to read the xml file, i have to specify how many bytes to read. Usually, i would use Response.ContentLength but in some cases it's equal to -1. According to google searches, ContentLength is optional and in this case, i have to calculate it myself.
How do i calculate ContentLength?
Thanks