title: Create class instance from string
body: <p>I have a C# method which creates a new instance of a class from a string, however, I get an error when running the code.</p>
  
  <pre><code>obj = (ClassX)Activator.CreateInstance(Type.GetType("classPrefix_" + className));
  </code></pre>
  
  <blockquote>
    <p>ArgumentNullException was unhandled</p>
    
    <p>Value cannot be null</p>
    
    <p>Parameter name: <strong>type</strong></p>
  </blockquote>
  
  <p>Any help on this error would be appreciated.</p>