Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add programmatically Images into resources?

Tags:

c#

resources

I have some image files in my resouces [.resx file] that I have added by using Visual Studio. But, now I need to add the Images programmatically into resource.

How do I this?

like image 973
Jack Avatar asked Oct 11 '25 23:10

Jack


1 Answers

Use the ResXResourceWriter.AddResource method for each resource you want to add to the resx file. Use the overloads of this method to add string, object, and binary (byte array) data. If the resource is an object, it must be serializable.

See here for a complete sample - http://msdn.microsoft.com/en-us/library/gg418542.aspx

like image 69
Angshuman Agarwal Avatar answered Oct 14 '25 15:10

Angshuman Agarwal