码迷,mamicode.com
首页 > 移动开发 > 详细

AppDomian

时间:2015-06-26 12:37:06      阅读:142      评论:0      收藏:0      [点我收藏+]

标签:

在几个项目中都有看到这个东西,也零零碎碎读过各种介绍,其实都没有一个很好的概念。StackOverflow 上面有一个解释挺好。记录一下。

Q:What is the most important use of AppDomains in C#?

 

A:The single most important use is that your code has to have one - i.e. everything you write in C# executes in an AppDomain. That is quite important ;-p

If you mean additional app-domains:

When using plugins and other untrusted code, it allows you both isolation, and the ability to unload them (you can‘t unload assemblies - only entire app-domains).

I‘m using it currently to load dynamically generated dlls, so that I can unload them.

They also allow you to set different configuration files, trust levels, etc - but have associated costs of complexity and remoting.

MSDN has a section on app-domains, here.

 

AppDomian

标签:

原文地址:http://www.cnblogs.com/ssjzhong/p/4601840.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!