File recources

  • Thread starter Thread starter Scatropolis
  • Start date Start date
S

Scatropolis

Is there a way that I can add a couple of text files in my project so that
they'd be compiled in the exe? And once I do that, can I access them like
normal files (System.IO.StreamReader)?

Thanks.
 
Hi Scatropolis

You have to include the file and then set it's BuildAction property fo EmbeddedResource. This would embeded the file into the assembly. Once that is done, you could access/load the file using the ResourceManager. But note that you won't be able to update it like you do with stream or so

HTH
fbhca
 
Back
Top