ArcGIS Pro 2.9 API Reference Guide
GetSnapshot Method (ILayerContainer)

ArcGIS.Desktop.Mapping Namespace > ILayerContainer Interface : GetSnapshot Method
Returns a read-only snapshot of the layers in the container.
Syntax
Remarks
Prefer this function over direct access to the Layers collection, especially if you're on the GUI thread. Layer collections are modified on the worker thread, so using this function will ensure proper synchronization.
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

ILayerContainer Interface
ILayerContainer Members