Determine assembly that contains a class from the classname (not an instance of a type)

Posted by frediannon on Stack Overflow See other posts from Stack Overflow or by frediannon
Published on 2010-06-08T22:13:51Z Indexed on 2010/06/09 1:22 UTC
Read the original article Hit count: 203

Filed under:

I am trying to determine which assembly contains a particular class. I do NOT want to create an instance of a type in that assembly, but want something like this

namespace SomeAssembly
{
   class SomeClass
    {
    }
}

..and In client code I want:

Assembly containingAssembly = GetContainingAssembly(SomeClass)

© Stack Overflow or respective owner

Related posts about c#