How can I access embedded resources in a C# project?

前端 未结 2 1807
粉色の甜心
粉色の甜心 2020-12-11 05:52

Most of the threads I\'ve read about this question answer that you just have to access them like this:

.Properties.Resources.

        
2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-11 06:25

    Try using ResourceManager in the System.Resources Namespace. Obviously, it depends a bit on what you are trying to retrieve, but mine looks like this:

    ResourceManager.GetString("String1", resourceCulture);
    

提交回复
热议问题