Quick Resources Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    Quick Resources Question

    I've been spending most of my day thoroughly investing the use of resource (resx) files in applications.

    I have noticed that the designer files that are automatically created for resx files by Visual Studio (or ResGen) contain a private shared/static instances of a ResourceManager and a CultureInfo.

    They also contain a bunch of public shared properties with names that match the Key Names of my resource strings. These properties return the string resource stored within my resx file (by calling the private shared/static ResourceManager 's GetString method)

    Right now I'm declaring my own instance of the ResourceManager for the resx file I need to work with and I'm calling the GetString method on it.....I am doing the same thing as the automatically generated class is doing.

    So my question is: Is there a way for me to call these auto-generated properties directly?

    Or do you have to create another ResourceManager that points to the resx file in order to use the resources?

    Declaring multiple resources that point to the same resources file seems like a waste of *resources to me (*I mean memory and processing time resources here)

    -Frinny
Working...