0

Can somebody tell me the file read and write syntax. I found the following code on the net. but didnt get that.

fs2.Read(fs2Content, 0, (int)fs2.Length);
fs1.Write(fs2Content, 0, (int)fs2.Length);

what exactly first, second and third arguement will do in above statements. pls give me some details regarding this.

Thanks

6
Contributors
7
Replies
8
Views
8 Years
Discussion Span
Last Post by Ramy Mahrous
0

// reading the contetnt of file
StreamReader sr = new StreamReader(Sting Path);
textbox1.text=sr.ReadToEnd();
sr.Close();

//writing to the file

StreamWriter sw = new StreamWriter(Sting Path);
sw.WriteToEnd();
sw.Close();

0

OK BlackSun your attempt is honorable but totally beside the question. ( And please drop your textbox fumbling!)

Indianblues just needs to follow the advice of LizR here: open the helpfile and look for StreamReader Read. If Indianblues has no helpfile he can google for help or come back here.

0

not sure if the is the correct fourm, but need some help.
I have a file 77D7.txt, need to read it and reformate and create a new file. There are 4 field seperated by "," in each line. Would someone please help me get started.

Thanks very much

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.