AssemblyBuilderAccess 枚举
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
定义动态程序集的访问模式。
此枚举支持其成员值的按位组合。
public enum class AssemblyBuilderAccess
[System.Flags]
public enum AssemblyBuilderAccess
[System.Flags]
[System.Serializable]
public enum AssemblyBuilderAccess
[System.Flags]
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum AssemblyBuilderAccess
[<System.Flags>]
type AssemblyBuilderAccess =
[<System.Flags>]
[<System.Serializable>]
type AssemblyBuilderAccess =
[<System.Flags>]
[<System.Serializable>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type AssemblyBuilderAccess =
Public Enum AssemblyBuilderAccess
- 继承
- 属性
字段
| 名称 | 值 | 说明 |
|---|---|---|
| Run | 1 | 可以执行动态程序集,但不能保存。 |
| Save | 2 | 可以保存动态程序集,但不能执行。 |
| RunAndSave | 3 | 可以执行和保存动态程序集。 |
| ReflectionOnly | 6 | 动态程序集加载到仅反射上下文中,无法执行。 |
| RunAndCollect | 9 | 当动态程序集不再可访问时,将自动卸载其内存回收。 |
注解
此枚举在 .NET 中仅定义两个字段(Run 和 RunAndCollect)。 在 .NET Framework 中,它定义了另外三个字段(ReflectionOnly、RunAndSave 和 Save)。 有关详细信息,请参阅 AssemblyBuilder 类备注。