GetBandCount Method (RasterDatasetDefinition)
Gets the number of bands in the raster dataset.
This method must be called on the MCT. Use QueuedTask.Run.
public int GetBandCount()
Public Function GetBandCount() As Integer
Return Value
An integer representing the number of bands in the raster dataset.
Get the raster dataset definition from a raster dataset
await QueuedTask.Run(() =>
{
RasterDatasetDefinition rasterDatasetDefinition = rasterDataset.GetDefinition();
// access the dataset definition properties
rasterDatasetDefinition.GetBandCount();
});
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.