Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Question STRTOFILE in .Net Compatibility
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01459243
Message ID:
01459376
Views:
48
>
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform