简体   繁体   中英

Event that is triggered when a string from the resourcefile is loaded

I want a custom version of my strings in resource file but I dont want to create it completly new because it's just for a short period of time.

Is there any way to trigger an event when my program calls Properties.Resources.MyString so I can manipulate it before it is shown to the user?

You can do that by changing Resources class (look at generated code), but the drawback is that this class is regenerated each time you add/change something in resources file. You can omit that problem by implementing your own generation tool, read this: Extended Strongly Typed Resource Generator

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM