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

# ScriptEngineDisableListIndexTypeRestriction Property

Enables or disables type restriction for array and list elements retrieved by index.
Namespace: Microsoft.ClearScript
Assembly: ClearScript.Core (in ClearScript.Core.dll) Version: 7.5.0
Syntax
C#
VB
C++
F#
Copy

    public bool DisableListIndexTypeRestriction { get; set; }

    Public Property DisableListIndexTypeRestriction As Boolean
    	Get
    	Set

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

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

#### Property Value

Boolean

#### Implements

IScriptEngineDisableListIndexTypeRestriction
Remarks
In ClearScript 5.4.4 and earlier, indexed array and list elements were exempt from type restriction. ClearScript 5.4.5 introduced a breaking change to correct this, but you can set this property to true to restore the exemption if you have older script code that depends on it.
See Also

#### Reference

ScriptEngine Class
Microsoft.ClearScript Namespace
DisableTypeRestriction

Copyright © Microsoft Corporation. All rights reserved.

Send comments on this topic to Microsoft