Get a collection of lists that can be accessed name.
Syntax
Example
The following example uses
Lists property of "project" for getting list by name.
| C# | Copy Code |
|---|
// get list by name "MyList"
var list = project.Lists["MyList"];
// add a new item to list
list.Add("new_list_item");
// get list by name "AnotherList" and get count of item
int count = project.Lists["AnotherList"].Count; |
| PHP | Copy Code |
|---|
// get list by name "MyList"
$list = $project->Lists->get_Item("MyList");
// add a new item to list
$list->Add("new_list_item");
// get list by name "AnotherList" and get count of item
$count = $project->Lists->get_Item("AnotherList")->Count; |
Requirements
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven
See Also