This document is archived and information here might be outdated.  Recommended version.


Set Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Classes > S > Set Class
ArcGIS Developer Help

SetClass Class

Generic set of objects.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The Set object is used to hold a collection of objects, which do not have to be homogenous. Like the similar Array object, the Set object enables ArcObjects to pass around collections of object references in a cross platform manner; you can store and retrieve a set of object references in the same way regardless of which ArcObjects API you are using.

The Set object offers only sequential access to its members rather than the random access of an Array. It does, however, provide a method to search the set for a particular object. The most important difference between an Array object and a Set object, is that an object reference can only belong to a Set once. If you add the same object to a Set twice, no error occurs but the resulting Set has only one reference to the object. A Set is analogous to a mathematical concept of a set�there is no guaranteed order to its members. The Set object is somewhat slower than an Array for storing references to large amounts of objects. Set objects are used by several interfaces including IRelationshipClass, IFeatureEdit, and IComPropertyPage.

Supported Platforms

Windows, Solaris, Linux

Interfaces

Interfaces Description
ISet Provides access to members that control a simple set of objects.