ClearScript Library
ClearScript Library
ClearScript Library Reference
Microsoft.ClearScript
ScriptEngine Class
ScriptEngine Properties
AccessContext Property
AllowReflection Property
ContinuationCallback Property
Current 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

# ScriptEngineDisableTypeRestriction Property

Enables or disables type restriction for field, property, and method return values.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public bool DisableTypeRestriction { get; set; }

    Public Property DisableTypeRestriction As Boolean
    	Get
    	Set

    public:
    virtual property bool DisableTypeRestriction {
    	bool get () sealed;
    	void set (bool value) sealed;
    }

    abstract DisableTypeRestriction : bool with get, set
    override DisableTypeRestriction : bool with get, set

#### Property Value

Boolean

#### Implements

IScriptEngineDisableTypeRestriction
Remarks
When this property is set to true, script code running in the current script engine has access to the runtime types of all exposed host resources, which by default are restricted to their declared types. The default behavior is a general requirement for correct method binding, so setting this property to true is not recommended.
See Also

#### Reference

ScriptEngine Class
Microsoft.ClearScript Namespace
ExposeRuntimeType

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft