title: How to associate a Resx file to a class in Visual Studio 2010
body: <p>How do I associate/"bind" an resx file to a class file in Visual Studio?
  For example, when a new windows form is created, an resx file is automatically associated with it.</p>
  
  <p><img src="https://i.stack.imgur.com/shRDl.jpg" alt="alt text"></p>
  
  <p>I am asking this as the following code doesn't open the right resource file for another .cs file I have:</p>
  
  <pre><code>ComponentResourceManager manager = new ComponentResourceManager(typeof(MyClass));
  </code></pre>
  
  <p>This code works fine for frmLogin from above however.      </p>
  
  <p>The MSDN documentation for the constructor:</p>
  
  <blockquote>
    <p>Creates a ComponentResourceManager
    that looks up resources in satellite
    assemblies based on information from
    the specified Type.</p>
  </blockquote>