Reputation: 29719
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 ?
Upvotes: 1
Views: 808
Reputation: 1038710
MyFile.ResourceManager.GetString("PropertyOneName", MyFile.Culture)
Upvotes: 3