Skip to main content

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.

  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