Search
IEnumerable Constructor
See Also
 






Initializes a new instance of the IEnumerable class.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

 Syntax

JavaScript  Copy Code

function IEnumerable ([items])

 Parameters

items
Optional.

Array. The underlying array data structure of the collection.

 Remarks

You are not expected to call directly the IEnumerable constructor. Instead, derive from it or initialize one of the derived calsses: List, ObservableCollection etc.

 Example

The following sample creates a new instance of the Menu class and adss one MenuItem to it. The items collection of the Menu class derives from IEnumerable.

JavaScript  Copy Code

var menu = new ui.Menu(document.getElementById("links"));
menu.loadOnDemand = true;

var menuItem = new ui.MenuItem("Start", "index.html");
menuItem.target = "_blank";
menu.items.add(menuItem);

 See Also