I want to override System.Resources.ResourceManager
from Resources.Designer.cs
file to achieve custom ResourceManager.GetString(...) method functionality. Is this possible?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Carriage Return (ASCII chr 13) is missing from tex
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
I created a
CustomResourceManager
that overrides theGetString()
calls like so:Then I added a pre-build step to my project to replace the creation of a
System.Resources.ResourceManager
with myCustomResourceManager
in the generatedResource.Designer.cs
file:And away we go!
I believe you're asking two separate questions here. You can certainly override
ResourceManager.GetString
. You can't, however, use that override in the auto-generatedResource.Designer.cs
code. To use it, you'll have to write your ownResource
designer class.