Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question STRTOFILE in .Net Compatibility
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01459243
Message ID:
01459376
Vues:
49
>
>1. Is there a function in .NET (C#) that works like the FileToStr?
>2. If so, will VFP StrToFile function be able to read that string value created in C# and still create the PDF?
>

Yes. Take a look in the System.IO namespace, specifically the File class. There are 4 methods here you'd probably interested in:
FILETOSTR() - 

byte[] file = File.ReadAllBytes(@"C:\SomePathToFile\FileHere.PDF");
string file = File.ReadAllText(@"C:\SomePathToFile\FileHere.txt")

STRTOFILE() - 
File.WriteAllBytes(@"C:\SomePathToFile\FileHere.PDF", file);
File.WriteAllText(@"C:\SomePathToFile\FileHere.PDF", file);
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform