ArcObjects Library Reference (GeoDatabase)  

IWorkspace.DatasetNames Property

The DatasetNames in the workspace.

[Visual Basic .NET]
Public Function get_DatasetNames ( _
    ByVal DatasetType As esriDatasetType _
) As IEnumDatasetName
[C#]
public IEnumDatasetName get_DatasetNames (
    esriDatasetType DatasetType
);
[C++]
HRESULT get_DatasetNames(
  esriDatasetType DatasetType,
  IEnumDatasetName** DatasetNames
);
[C++]

Parameters

DatasetType [in]

  DatasetType is a parameter of type esriDatasetType

DatasetNames [out, retval]

  DatasetNames is a parameter of type IEnumDatasetName

Product Availability

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

Remarks

The DatasetNames method returns an enumerator over the dataset names in the workspace for the specified dataset type. Name objects are lightweight versions of the geodatabase objects they refer to while still providing access to some of the properties/methods available in the geodatabase object. From a name object an instance of the geodatabase object specified by the name object can be created/returned and vice versa.

See esriDatasetType for more information on dataset types.

Browsing applications should use the DatasetNames method to obtain name objects. These dataset name objects contain the essential properties of the corresponding dataset objects and are faster to retrieve. If the actual dataset specified by a name object is required (for example, because the user selected it), then it can easily be instantiated by calling the Open method on the name object.

Using a dataset type of esriDTAny will return all the datasets or dataset names in the workspace, across all dataset types. Note that only the top-level datasets in the workspace are returned by these methods. In particular, if a workspace contains both stand-alone feature classes and additional feature classes that are part of a feature dataset, then calling the DatasetNames property on the workspace with a dataset type of esriDTFeatureClass will return only the standalone feature classes. In order to get the feature class names within a feature dataset, the application needs to get the FeatureClassNames property on the top-level feature dataset name returned by the workspace.

See Also

IWorkspace Interface