I can't find any good documentation on what the concept of a Class Loader is in the .NET Framework? What is it? Where can it be found? Does anyone know?
In .NET assemblies are the fundamental unit of deployment. The technology that actually loads the assemblies is called Fusion. For more details on that read the .NET Fusion Workshop. Each assembly has its own class loader to load types from that assembly.
Hosting the Common Language Runtime may also be of interest.
I don't think that Class Loader in .NET holds the same importance or power as it does in Java. The loading of the class would be handled by the assembly's class loader.
Dynamic loading would usually be done by loading the assembly and then instantiating the class:
Assembly assembly = Assembly.LoadFrom("assemblyName");
Type type = assembly.GetType("className");
object x = Activator.CreateInstance(type);
Randy Levy's didn't answer all. Class loader did more jobs than Assembly.LoadFrom. Because there isn't a method like ‘Assembly.Unload'. The assemblies could be only unloaded by closing appdomain. Java's class loader can do lot of more than Randy Levy's answer. Here tag a better answer in stackoverflow Equivalent of Class Loaders in .NET
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With