Adding resource to a file!

C

CSharper

Just curious, When you are in IDE, you are able to add a resource to
the project through resource tab. Later this resource can be accessed
using the resource manager. One good thing about this approach is
that, the resource file is build into the exe and using resource
manager you can later get already added resource file back.
Now is it possible to do that through programatically? I want to add a
resource to the default resource (if I use resource writer then I need
to explicitly specify the resource file and that resource file need to
be distributed along with the exe) during execution on the fly, is it
possible?

Thanks.
 
I

Ignacio Machin ( .NET/ C# MVP )

Just curious, When you are in IDE, you are able to add a resource to
the project through resource tab. Later this resource can be accessed
using the resource manager. One good thing about this approach is
that, the resource file is build into the exe and using resource
manager you can later get already added resource file back.
Now is it possible to do that through programatically? I want to add a
resource to the default resource (if I use resource writer then I need
to explicitly specify the resource file and that resource file need to
be distributed along with the exe) during execution on the fly, is it
possible?

Thanks.

I do not understand what you ask, you cannot modify the assembly from
"regular code" , you could try to use CodeCOM or something similar,
maybe there is a tool that allow you to do that , I know of none
though.
 
C

CSharper

I do not understand what you ask, you cannot modify the assembly from
"regular code" , you could try to use CodeCOM or something similar,
maybe there is a tool that allow you to do that , I know of none
though.

Thank you I think I figured it out. I compiled the code with /resource
option and was able to get it into my exe to use it.
 

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