borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Form Show?)Next Topic (How do I use this rubbish? (classes)) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : what is the difference between file and stream ?
Poster Message
tri_inn
Level: Regular User
Registered: 26-08-2002
Posts: 395

icon what is the difference between file and stream ?

what is stream.please tell me the difference between file and stream class.

05-08-2004 at 06:44 AM
View Profile Send Email to User Show All Posts | Quote Reply
johnedw
Level: Sage

Registered: 15-08-2004
Posts: 50
icon Re: what is the difference between file and stream ?

Ok, FileStream class is a base class for FILEIO operations
ok, this is a pretty low level class...

For example,

Dim f as New FileStream ("C:\t.vb",FileMode.OpenOrCreate)

ok, now, this class has a write function for example,
that takes in an array of bytes, an offset and
a count.

This might be a little harder to do direct writing of strings
for example.... well anyway, it is defenitly  a usable class but
the StreamWriter class however is a helper class(an even
higher level implementation)

So you could do...

Dim WriterFriendly as new StreamWriter(f) ' f would be the earlier filestream

WriterFriendly.Write("Hello")
WriterFriendly.Close


Hope this helps!




____________________________
Today is a new day, in
a world OF CODE!

15-08-2004 at 01:40 AM
View Profile Send Email to User Show All Posts ICQ | Quote Reply
AndreaVB Forum : VB.Net : what is the difference between file and stream ?
Previous Topic (Form Show?)Next Topic (How do I use this rubbish? (classes)) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder