Iterating through a ManagedObjectCollection

 

ManagedObjectCollections are used in CAB to manage the EventTopics-, Items-, SmartParts-, WorkItems- and WorkSpacesCollection of a WorkItem.

To iterate for example through the WorkItem.Workspaces use the following snippet:

foreach (KeyValuePair<string, IWorkspace> item in workItem.Workspaces)
{
    System.Diagnostics.
Debug.Print(item.Key);
}

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Posted by: michael
Posted on: 3/3/2008 at 9:16 PM
Categories: CAB | CAB snippets
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Related posts

Comments are closed