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

后端 未结 4 1965
南方客
南方客 2020-12-08 03:36

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

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 04:10

    “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.

提交回复
热议问题