Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.Opens in a new tab

For information on migrating to InterSystems IRISOpens in a new tab, see Why Migrate to InterSystems IRIS?

コレクション : リスト

ここでは、Caché のリスト・コレクションのプロジェクション (投影) の要素に、繰り返し処理を行う .NET コードの例を紹介します。この場合、Caché リストには、%StringOpens in a new tab インスタンスが含まれています。これは、CacheListOfStrings オブジェクトに投影されます。


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){}

cnCache は、開いている CacheConnection インスタンスを表します。

FeedbackOpens in a new tab