Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Two functions into one
Message
From
27/06/2006 11:38:58
 
 
To
27/06/2006 11:03:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01131998
Message ID:
01132043
Views:
10
>IMHO VFP FileToStr() equivalant is BinaryReader not StreamReader.

I cannot see how I can have a universal method by using BinaryReader which I would be able to use to read text file. For example, I could have the following:
Dim loBinaryReader As IO.BinaryReader
Dim loByte() As Byte
Dim loFileStream As IO.FileStream
loFileStream = New IO.FileStream(tcFileName, FileMode.Open, FileAccess.Read)
loBinaryReader = New IO.BinaryReader(loFileStream)
loByte = loBinaryReader.ReadBytes(CType(loFileStream.Length, Integer))
As this point, I have an object Byte. If I am reading a text file, how can I convert this object back to a string?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform