Assembly.ReflectionOnly Assembly.ReflectionOnly Assembly.ReflectionOnly Assembly.ReflectionOnly Property

定义

获取 Boolean 值,该值指示此程序集是否被加载到只反射上下文中。Gets a Boolean value indicating whether this assembly was loaded into the reflection-only context.

public:
 virtual property bool ReflectionOnly { bool get(); };
[System.Runtime.InteropServices.ComVisible(false)]
public virtual bool ReflectionOnly { get; }
member this.ReflectionOnly : bool
Public Overridable ReadOnly Property ReflectionOnly As Boolean

属性值

如果程序集被加载到只反射上下文而不是执行上下文中,则为 true;否则为 falsetrue if the assembly was loaded into the reflection-only context, rather than the execution context; otherwise, false.

注解

如果使用ReflectionOnlyLoad方法将程序集加载到仅反射上下文中,则无法在程序集中执行代码。If an assembly has been loaded into the reflection-only context, using the ReflectionOnlyLoad method, you cannot execute code in the assembly. 若要执行代码,必须将程序集加载到执行上下文中。To execute code, the assembly must be loaded into the execution context.

适用于