C Board  

Go Back   C Board > General Programming Boards > C# Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-24-2006, 12:30 PM   #1
Registered User
 
Join Date: Dec 2005
Posts: 141
Stream as return function

Hi,

Could anyone please let me know if there are any functions that reads a .txt file and returns a stream?

Ak
AngKar is offline   Reply With Quote
Old 05-24-2006, 12:39 PM   #2
and the Hat of Clumsiness
 
GanglyLamb's Avatar
 
Join Date: Oct 2002
Posts: 1,101
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.
GanglyLamb is offline   Reply With Quote
Old 05-24-2006, 12:59 PM   #3
Registered User
 
Join Date: Dec 2005
Posts: 141
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?
AngKar is offline   Reply With Quote
Old 05-24-2006, 01:30 PM   #4
Registered User
 
Join Date: Dec 2005
Posts: 141
More specifically, I need to put the text into a stream without creating a file.
Can I do that in C#?
AngKar is offline   Reply With Quote
Old 05-24-2006, 10:18 PM   #5
Anti-Poster
 
Join Date: Feb 2002
Posts: 1,241
MemoryStream

Once again, use MSDN.

http://msdn2.microsoft.com/en-us/lib...orystream.aspx
__________________
Rule #1: Every rule has exceptions
pianorain is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dikumud maxorator C++ Programming 1 10-01-2005 06:39 AM
c++ linking problem for x11 kron Linux Programming 1 11-19-2004 10:18 AM
Setting int pointers to one function (not using five functions!) Marc Sharp C Programming 4 11-23-2003 07:15 AM
opengl program as win API menu item SAMSAM Game Programming 1 03-03-2003 07:48 PM
Contest Results - May 27, 2002 ygfperson A Brief History of Cprogramming.com 18 06-18-2002 01:27 PM


All times are GMT -6. The time now is 10:43 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22