advertisement
Login | Register   
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   TIP BANK
Browse DevX
Do you miss classic VB's file I/O statements? Did this article help show how VB.NET replaces those statements? Do you think the VB.NET versions are more or less powerful than classic VB? Let us know in the vb.dotnet.discussion or vb.dotnet.technical discussion groups.
Partners & Affiliates
advertisement
advertisement
advertisement
advertisement
 

Take Advantage of Streams and Formatters in VB.NET

.NET File I/O operations use Stream and Formatter classes that abstract many tasks you had to code manually in classic VB.  


advertisement
When you first start learning VB.NET, one of the first things you may notice is the absence of "traditional" file I/O support in .NET. Microsoft has replaced the classic IO operations by stream operations. A stream is a simple concept that originated in the Unix world.


You can think of stream as a channel through which data flows from your application to a sequential data store (such as a file, a string, a byte array, or another stream), or vice versa. To understand why the traditional file I/O operations were replaced by streams, you must consider that not all data reside in files. Modern applications acquire data from many different data stores, including files, in-memory buffers and the Internet. The stream analogy enables applications to access all these data stores with the same programming model. There's no need to learn how to use Sockets to access a file on a remote Web server. You can establish a stream between your application and a remote resource and read the bytes as the server sends them.

It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com.
Already a member?



advertisement