title: Casting .resx classes to obtain ResourceSet
body: <p>I am trying to populate a dropdownlist with data pulled from a .resx file. Instead of having 5 different functions I'd like to be able to pass in the name of the .resx file and cast it somehow so I can retrieve it using GetReourceSet.</p>
  
  <p>Here's what I'm currently doing:</p>
  
  <pre><code>protected void populateCountryPickList(DropDownList whatDropDownList)
  {
      ResourceSet rs = Resources.CountryPickList.ResourceManager.GetResourceSet(CultureInfo.CurrentCulture, true, true);
      whatDropDownList.DataSource = rs;
      whatDropDownList.DataTextField = "Value";
      whatDropDownList.DataValueField = "Key";
      whatDropDownList.DataBind();
  }
  </code></pre>
  
  <p>In the example above I have a .resx file named CountryPickList.resx so its just a matter of using the .resx name to retrieve the ResourceSet using GetResourceSet...</p>
  
  <p>What I would like to be able to do is figure out how I can pass in a string to my function with the name of the .resx and obtain the same results.</p>
  
  <p>Any suggestions would be greatly appreciated!</p>
  
  <p>cheers,</p>
  
  <p>rise4peace</p>