Access Text File added to Resource

T

TD is PSP

I used the <Project><Properties> menu option to display the properties for my
project. There I clicked on the resources and added 5 text files whose
persistance is set to "Linked at compile time" (and I can't change that). At
runtime I tried using the Assembly object to retreive my file however it
doesn't seem to be there. I confirmed it with a call to
GetManifestResourceNames and indeed none of my 5 files show up in the list.

So the question how can I access the files within my code at runtime. Or
what should I do differently in order to embed files within my runtime (so
they are not visible to the user, or file system) and then access them within
the code at runtime.
 
C

Ciaran O''Donnell

You can put them in your Resources and set he build action to "Embedded
Resource"
 
T

TD is PSP

Cool.

Also how can I save Application Properties. It's easy enough to save User
Properties but Application properties are read-only.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top