ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / ILayerContainer Interface / GetSnapshot Method

In This Topic
    GetSnapshot Method (ILayerContainer)
    In This Topic
    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

    ArcGIS Pro version: 3 or higher.
    See Also