2011-01-21 62 views
1

在我的項目中我有resx文件。 MyFile.resx獲取resx文件

如果我在我的代碼中使用:

MyFile.PropertyOneName; MyFile.PropertyTwoName 

一切都很正常,我可以有機會獲得這些屬性值

但是,如果我想通過字符串參數作爲propertyName的什麼,獲得通過反射:

的typeof(MyFile的).GetProperties返回0元素,而我在這有很多屬性:/

任何建議?

回答

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