开发者

Get access to resx file

开发者 https://www.devze.com 2023-02-05 19:19 出处:网络
In my project I have resx file. MyFile.resx If I use in my code: MyFile.PropertyOneName; MyFile.PropertyTwoName

In my project I have resx file. MyFile.resx

If I use in my code:

MyFile.PropertyOneName; MyFile.PropertyTwoName

Everything works great and I can have access to these properties values

But what if I want to pass string parameter as a propertyName and get that by reflection:

typeof(MyFile).GetProperties returns 0 开发者_运维百科elements while I have a lot properties in it :/

any suggestions ?


MyFile.ResourceManager.GetString("PropertyOneName", MyFile.Culture)
0

精彩评论

暂无评论...
验证码 换一张
取 消