Search code examples
c#propertygridtypeconverter

typeconverter from dll


I am using the propertygrid with a class and associated type converter. When I moved the class and the TypeConverter to a dll, it seems that it is not being called. Can't find how to activate the typeconverter from a dll.

Assembly a = Assembly.LoadFile(modulepath + elementname + ".dll");
try
{
    object myobj = a.CreateInstance(objectname);            
    Type objecttype = myobj.GetType();
}

Appreciate any hints. Thank you.


Solution

  • It could be because Assembly.LoadFile loads the file in a different binding context from the rest of your code.