Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two functions into one
Message
De
27/06/2006 11:38:58
 
 
À
27/06/2006 11:03:59
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01131998
Message ID:
01132043
Vues:
11
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform