ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
IScriptEngine Interface
IScriptEngine Properties
AccessContext Property
AllowReflection Property
ContinuationCallback Property
CustomAttributeLoader Property
DefaultAccess Property
DisableDynamicBinding Property
DisableExtensionMethods Property
DisableFloatNarrowing Property
DisableListIndexTypeRestriction Property
DisableTypeRestriction Property
DocumentSettings Property
EnableAutoHostVariables Property
EnableNullResultWrapping Property
EnforceAnonymousTypeAccess Property
ExposeHostObjectStaticMembers Property
FileNameExtension Property
FormatCode Property
Global Property
HostData Property
Name Property
NullExportValue Property
NullImportValue Property
Script Property
UndefinedImportValue Property
UseReflectionBindFallback Property
VoidResultValue Property

# IScriptEngineAllowReflection 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
C#
VB
C++
F#
Copy

    bool AllowReflection { get; set; }

    Property AllowReflection As Boolean
    	Get
    	Set

    property bool AllowReflection {
    	bool get ();
    	void set (bool value);
    }

    abstract AllowReflection : bool with 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 typeOfT. By default, any attempt to invoke these members from script code results in an exception.
See Also

#### Reference

IScriptEngine Interface
Microsoft.ClearScript Namespace

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft