Dynamically Loading and calling a .net object

Is it possible to dynamically load then call a .net object. For instance, I have a exe and with this exe, I want to provide a folder that has a bunch of .net dlls with the same interface. I don't know the names of these dlls before the exe is compiled. I want to load all of the .net objects into memory and let the user select which ones to use.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes, I've also done this already.
Just use:
Type myType = Type.GetType("Full.Class.Name, AssemblyName");
skibud2Author Commented:
doesn't that assume that it is already loaded in the GAC? I am trying to load it from the dll.
Interesting project. ptmcomp's suggestion is close. You can read about the following and decide on what serves your purpose best:


Have fun...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
skibud2Author Commented:
I split it 125/125 because you both gave answers that helped me. Thanks guys!

That's the code I used:
                  foreach (string typeName in typeNames)
                        Type type;
                        object dataSource;

                        type = Type.GetType(typeName);
                        if (type == null)
                              throw new ApplicationException(string.Format("Cannot load type '{0}'", typeName));
                        dataSource = Activator.CreateInstance(type);

This way there is no need to call Assembly.Load()
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.