AssemblyBuilder.ReflectionOnly AssemblyBuilder.ReflectionOnly AssemblyBuilder.ReflectionOnly AssemblyBuilder.ReflectionOnly Property


Gets a value indicating whether the dynamic assembly is in the reflection-only context.

 virtual property bool ReflectionOnly { bool get(); };
public override bool ReflectionOnly { get; }
member this.ReflectionOnly : bool
Public Overrides ReadOnly Property ReflectionOnly As Boolean

Property Value

true if the dynamic assembly is in the reflection-only context; otherwise, false.


To emit a dynamic assembly in the reflection-only context, specify AssemblyBuilderAccess.ReflectionOnly when you create the AssemblyBuilder. If a dynamic assembly is emitted in the reflection-only context, its code cannot be executed.


After you have saved a dynamic assembly to disk, you can use the Assembly.ReflectionOnlyLoad method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified.

Applies to

See also