Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Collections: Lists

Here is an example of .NET code for iterating through the elements of the projection of a Caché list collection. In this case, the Caché list contains %StringOpens in a new tab instances. It projects to a CacheListOfStrings object.


try
{
  Provider.Collections coll = Provider.Collections.OpenId(cnCache, "1");
  CacheListOfStrings stringList = coll.ListOfStrings;
  foreach (string str in stringList)
  {
    Console.WriteLine("String: {0}", str);
  }
}
catch(CacheException e){}

Note that cnCache represents an open CacheConnection instance.

FeedbackOpens in a new tab