Просто помещенный: 1) удостоверьтесь, что все объекты сопоставимы, 2) сортируют массив, 2) выполняют итерации по массиву и находят дубликаты
После загрузки сборки с помощью Assembly.LoadFrom (...) вы можете получить тип по имени и получить любой статический метод:
Type t = Type.GetType(className);
// get the method
MethodInfo method = t.GetMethod("MyStaticMethod",BindingFlags.Public|BindingFlags.Static);
Then you call the method:
method.Invoke(null,null); // assuming it doesn't take parameters
вот пример:
string assmSpec = ""; // OS PathName to assembly name...
if (!File.Exists(assmSpec))
throw new DataImportException(string.Format(
"Assembly [{0}] cannot be located.", assmSpec));
// -------------------------------------------
Assembly dA;
try { dA = Assembly.LoadFrom(assmSpec); }
catch(FileNotFoundException nfX)
{ throw new DataImportException(string.Format(
"Assembly [{0}] cannot be located.", assmSpec),
nfX); }
// -------------------------------------------
// Now here you have to instantiate the class
// in the assembly by a string classname
IImportData iImp = (IImportData)dA.CreateInstance
([Some string value for class Name]);
if (iImp == null)
throw new DataImportException(
string.Format("Unable to instantiate {0} from {1}",
dataImporter.ClassName, dataImporter.AssemblyName));
// -------------------------------------------
iImp.Process(); // Here you call method on interface that the class implements