.NET类加载器 - 这是什么? [英] .NET Class Loader - What is it?

查看:133
本文介绍了.NET类加载器 - 这是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找不到什么类加载器的概念是在.NET Framework中的任何好的文档?它是什么?在哪里可以被发现?有谁知道?

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?

推荐答案

在.NET程序集是部署的基本单位。实际加载组件的技术被称为融合。有关更多详细信息,请阅读 .NET融合研讨会。每个组件都有自己的类加载器从该程序集加载类型。

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.

承载公共语言运行库也可能是兴趣。

我不认为类加载器.NET持同样的重要性或权力,因为它在Java中。类的加载将由组装的类加载器来处理。

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);

这篇关于.NET类加载器 - 这是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆