Represents a collection of lists that can be accessed by namespace and name.
Syntax
| C# | |
|---|
public interface ILists |
Remarks
Example
The following example uses property
Lists of "project" for adding a new items into list.
| C# | Copy Code |
|---|
// get list
IList<string> list = project.Lists["MyList"];
// show count of list
System.Windows.Forms.MessageBox.Show(String.Format("Now count of the list is {0}", list.Count), "Count of list");
// add a new items
list.Add("new item 1");
list.Add("new item 2");
list.Add("new item 3");
// show count of list
System.Windows.Forms.MessageBox.Show(String.Format("Now count of the list is {0}", list.Count), "Count of list"); |
| PHP | Copy Code |
|---|
// get list
$list = $project->Lists->get_Item("MyList");
// show count of list
System\Windows\Forms\MessageBox::Show(String::Format("Now count of the list is {0}", $list->Count), "Count of list");
// add a new items
$list->Add("new item 1");
$list->Add("new item 2");
$list->Add("new item 3");
// show count of list
System\Windows\Forms\MessageBox::Show(String::Format("Now count of the list is {0}", $list->Count), "Count of list"); |
Requirements
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven
See Also