ArcGIS Pro 2.7 API Reference Guide
GetBandCount Method (Raster)

ArcGIS.Core.Data.Raster Namespace > Raster Class : GetBandCount Method
Gets the number of bands in this raster. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public int GetBandCount()
Public Function GetBandCount() As Integer

Return Value

An integer representing the number of bands in this raster.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Raster Class
Raster Members