Hi,
Could anyone please let me know if there are any functions that reads a .txt file and returns a stream?
Ak
Hi,
Could anyone please let me know if there are any functions that reads a .txt file and returns a stream?
Ak
FileStream
Use msdn for this sort of thing next time.
http://msdn.microsoft.com/library/de...ClassTopic.asp
You can pass this FileStream to either StreamWriter or StreamReader.. then you dont have to deal with an array of bytes to read and write.
But I need a Stream as return type. The external fn I'm using is not working when I pass the FileStream object
I need to pass a Stream object. Can I do that?
More specifically, I need to put the text into a stream without creating a file.
Can I do that in C#?
MemoryStream
Once again, use MSDN.
http://msdn2.microsoft.com/en-us/lib...orystream.aspx
If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein