Click or drag to resize

IScriptEngine.AllowReflection Property

Controls whether script code is permitted to use reflection.

Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
bool AllowReflection { get; set; }

Property Value

Boolean
Remarks
When this property is set to true, script code running in the current script engine is permitted to use reflection. This affects Object.GetType(), Exception.GetType(), Exception.TargetSite, Delegate.Method, typeOf(Object) and typeOf<T>(). By default, any attempt to invoke these members from script code results in an exception.
See Also