Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Embedded Files
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01221528
Message ID:
01221544
Views:
6
Hi,

>In VFP, I could embed a file into the EXE and then using STRTOFILE(FILETOSTR(Myfile), newfile) to export it out to reality. What's the best approach to doing the same thing under .NET?

Add the file as an embedded resource in your project then something like:
using (System.IO.StreamWriter sw = new System.IO.StreamWriter("Outfile.txt"))
{
      sw.Write(ProjName.Properties.Resources.ResourceName);
}
HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform