title: Get type in referenced assembly by supplying class name as string?
body: <p>These are similar questions: <a href="https://stackoverflow.com/questions/3068131/how-to-load-a-type-from-a-referenced-assembly-at-runtime-using-a-string-in-silv">How-to: Load a type from a referenced assembly at runtime using a string in Silverlight</a>, <a href="https://stackoverflow.com/questions/2233516/gettype-on-a-class-in-a-referenced-assembly-fails">GetType on a class in a referenced assembly fails</a> but neither answer works.</p>
  
  <p>I've got an MVC project that pulls data from a database that includes the plain types as strings. These types are in a referenced assembly, not in the MVC project.</p>
  
  <p>So for example let's say my Referenced Assembly Name is <code>MyFramework</code> and the plain type name <code>Car</code>, the full type name could be <code>MyFramework.Cars.Car</code> or <code>MyFramework.Vehicles.Cars.Car</code> or some other variation. All I have are the referenced assembly name and plain class name as strings. How can I get the type regardless of the full type name?</p>
  
  <p>Finally, could I write a function in the referenced assembly that calls GetType() and use that in the MvC project so I could forego including the assembly name? I want to remove knowing the assembly name so I thought I could write a Util IN the referenced assembly like:</p>
  
  <pre><code>namespace MyFramework //the referenced assembly
  {
    public static class TypeUtil
    {
      public static Type GetFrameworkType(string typeName)
      {
          return Type.GetType(typeName);
      }
    }
  }
  </code></pre>
  
  <p>And then in my MVC project I could call it without needing the assembly as a string name. Is that possible or will I always need the assembly name?</p>