IVsaScriptScope.AddItem Method

Used as a factory for child items that can be added to a scope, for example, script blocks, expressions, statements, host objects, host scopes, and script scopes.

Namespace: Microsoft.JScript
Assembly: Microsoft.JScript (in microsoft.jscript.dll)

IVsaItem AddItem (
	string itemName,
	VsaItemType type
)
IVsaItem AddItem (
	String itemName, 
	VsaItemType type
)
function AddItem (
	itemName : String, 
	type : VsaItemType
) : IVsaItem

Parameters

itemName

A string name for the new item. The name must not be in use; otherwise an ItemNameInUseVsaException is thrown.

type

The VsaItemType Enumeration was fixed and new item types were added. The JScript implementation accepts VSAITEMTYPE2 values and rejects VsaItemType items

In the JScript implementation, the VSA engine must not be closed; otherwise an EngineClosedVsaException is thrown.

In the JScript implementation, the item name must not be already in use; otherwise an ItemNameInUseVsaException is thrown.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: