Hi all, I'm having trouble finding information for what I need. I think it's because I don't really know the nane of what I'm looking for, so keywords are eluding me in my search.
I hope my explanation might give someone a clue who can help or at least tell me what to search.
I want my application to use external third party dll files, from which it will gather information without having to modify my code.
So as an example, I have in my code (which will be compiled as exe) code such as...
namespace NSpace
{
interface IInterface1
{
string name();
string url();
}
class InternalUse : IInterface1
{
public string name { get; set; }
public string url { get; set; }
string IInterface1.name()
{
string name = "site name";
return name;
}
string IInterface1.url()
{
string url = @"http://www.somewebsite.com";
return url;
}
}
}
I want end user to be able to create a class in a dll that implements IInterface1, in fact more than one dll and my exe will need to load and use its methods.
So as it stands, my exe will run, and print the name and url returned by the methods in InternalUse class.
My goal is that if my exe finds a dll in specific dir, it should load it, and print the name and url of whatever its ExternalUse class might return, there may be multiple dlls.
So what am I actually talking about, and what is simplest way to go about it?
I would prefer to use no later than .Net 4.
Thanks for reading my noob ramblings.
(edit)
I can, if it makes it easier, enforce the class name that implements IInterface1 in external dll, but not the dll name.