I am trying to load an assembly dynamically and create an variable of its type:
Assembly Ass= Assembly.LoadFrom(@"d:\abc\microsoft.office.interop.excel.dll");
foreach(Type Excel Assembly.Gettypes())
{
// here now Type contains
// Excel.nameSpace="microsoft.officce.interop.excel"
// now i need to creae an variable of type "Excel"
microsoft.officce.interop.excel.applicationClass excel= null;
// something like this
//Here Excel is my nameSpace
Excel.officce.interop.excel.applicationClass excel= null
}
I am working on this from past 2days any help how i can declare my variable of type Excel( which is the type i need to create)
any help would be great thank you