问题
I have a custom control on a form. Basically my Visual Studio has been fubared for the past 5 hours because my properties are loading at initialization.
The code:
this.customControl.customProp = ((System.Collections.Generic.List<customType>)(resources.GetObject("customControl.customProp")));
What I would like to know is where this code is actually being executed at or is it storing these pieces of data somewhere? What is killing me right now is that there is actually data associated with this resource object, however, the data doesn't get loaded until I query the database. I can't seem to find where its getting the data from.
I also, looked in the resource file and in the Other section and didn't see anything in there.
回答1:
Search your entire solution for "customControl.customProp" - that should show you where it's defined. It's going to be in a .resx file.
来源:https://stackoverflow.com/questions/10639632/where-is-the-resources-getobject-executing-at