Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Embedded Files
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Divers
Thread ID:
01221528
Message ID:
01221544
Vues:
7
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform