I have a project and also have a UserControlLibrary. I have created DLL of UserControlLibary.Now, I want to add it to my application by code.
I tried this, but it doesn't work.
Assembly a = Assembly.LoadFrom("user.dll");
Type myType = a.GetType();
UserControl user = (UserControl)a.CreateInstance(myType);
How can i do?
I suggest you have a "lib" directory or something where you copy your library to, and then add a reference to that.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)