What's the difference between a Resource and an Embedded Resource in a C# application?

Sergio Tapia picture Sergio Tapia · Dec 20, 2009 · Viewed 29.8k times · Source

When should I use one or the other?

I'd like all of the files I use in my app (images, sound, xml file, etc.) to be inside of the .exe file so I don't deploy with a bunch of folders and files.

Thanks for the info.

Answer

viky picture viky · Dec 20, 2009

“Resource” and “Content” build actions are to access the WPF resources using the Uris. However “Embedded Resource” is for prior technologies. However both options embed the resource in assembly but “Resource” option to be used for WPF.

MSDN provides full explanation here.