Posted on: 3/31/2011 2:10:43 AM | Views : 1104

Hello..
I am reading in a file into a string. Then I am writing this string to a stream. I know this code works fine.
The only problem that I have is with the line that write the data in chunks where the parameters is not supported for the Write method.
The line that has the problem is this line. What do I need to change here?
OutPut.Write(buffer, 0, Math.Min(to_write, WRITE_CHUNK));
 
dynamic fso = AutomationFactory.CreateObject("Scripting.FileSystemObject"); String filePath = "D:\\Folder1\\A1.txt"; dynamic file = fso.OpenTextFile(filePath, 1); List<String> getLines = new List<String>(); String line = ""; String dummy = file.ReadAll(); file.Close(); StringReader reader = new StringReader(dummy); while (reader.Peek() >= 0) { ...

Go to the complete details ...