ZennoLab Assemblies Documentation
Item Property (ILists)
Example 

Type: System.String
The name of list.

Get the list by the specified name.

Syntax
IZennoList this[ 
   string listName
]; {get;}

Parameters

listName

Type: System.String
The name of list.

Property Value

Type: IZennoList

The list of items.

Exceptions
ExceptionDescription
KeyNotFoundExceptionThe exception that is thrown when the name specified for accessing a list in a collection does not match any name in the collection.
Example
The following example uses property "Item" (operator []) to access a list with name "MyList".
// get list
var list = project.Lists["MyList"];
 
// result
string result = String.Empty;
 
if (list.Count > 0)
{
    foreach (string str in list)
    {
        if (String.IsNullOrWhiteSpace(result)) result = str;
        else result = String.Format("{0}:{1}", result, str);
    }
}
 
// return result
return result;
// get list
$list = $project->Lists->get_Item("MyList");
 
// result
$result = String::Empty;
 
if ($list->Count > 0)
{
    foreach ($str as $list)
    {
        if (String::IsNullOrWhiteSpace($result)) $result = $str;
        else $result = String::Format("{0}:{1}", $result, $str);
    }
}
 
// return result
return $result;
Requirements

Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.

See Also

Reference

ILists Interface
ILists Members
IZennoPosterProjectModel.Lists Property
ITables Interface

Send Feedback