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


IWorkspace.Datasets Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IW > IWorkspace Interface > IWorkspace.Datasets Property
ArcGIS Developer Help

IWorkspace.Datasets Property

The datasets in the workspace.

[Visual Basic .NET]
Public Function get_Datasets ( _
    ByVal DatasetType As esriDatasetType _
) As IEnumDataset
[C#]
public IEnumDataset get_Datasets (
    esriDatasetType DatasetType
);
[C++]
HRESULT get_Datasets(
  esriDatasetType DatasetType,
  IEnumDataset** Datasets
);
[C++]
Parameters
DatasetType [in]

DatasetType is a parameter of type esriDatasetType Datasets [out, retval]
Datasets is a parameter of type IEnumDataset**

Product Availability

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

Remarks

The Datasets method returns an enumerator over the datasets in the workspace of the specified dataset type. Not to be confused with DatasetNames, Datasets will return a fully hydrated dataset object.

See esriDatasetType for more information on dataset types.

Using a dataset type of esriDTAny will return all the datasets or datasets 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 Datasets property on the workspace with a dataset type of esriDTFeatureClass will return only the standalone feature classes.

See Also

IWorkspace Interface