Embedded resource suggestions?

K

Kyle Kaitan

I have an assembly (AppResources.dll) which contains a number of embedded
resource files. Most of these are key/value pairs of relevant strings; a few
are images and sounds; some more are XML files. My application will load the
resources into memory as they are needed.

I would like to be able to read and write to these embedded resources.

Is it possible to write to an embedded resource within an assembly? If so,
how? If it's not possible, what other resource-storage strategy would you
recommend so that I am able to read and write to the resources? I'd prefer
not to use individual files for each resource, if that's an option.

Thanks for your time.
 
A

Arne Janning

Hi Kyle,
"Kyle Kaitan" schrieb
I have an assembly (AppResources.dll) which contains a number of embedded
resource files. Most of these are key/value pairs of relevant strings; a
few
are images and sounds; some more are XML files. My application will load
the
resources into memory as they are needed.

I would like to be able to read and write to these embedded resources.

Is it possible to write to an embedded resource within an assembly? If so,
how? If it's not possible, what other resource-storage strategy would you
recommend so that I am able to read and write to the resources? I'd prefer
not to use individual files for each resource, if that's an option.

Did you take a look at the System.Resources.ResourceWriter-Class?
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemresourcesresourcewriterclasstopic.asp

Cheers

Arne Janning
 
K

Kyle Kaitan

Arne, I did indeed see that class. But I'll quote you a passage from it:
"Writes resources in the system-default format to an output file or an
output stream."

How would I open a writable stream to an embedded resource in an assembly?

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

Top