ArcGIS Pro 2.6 API Reference Guide
SelectLayers Method
Example 

ArcGIS.Desktop.Mapping Namespace > MapView Class : SelectLayers Method
Selects layers in the TOC.
Syntax
public void SelectLayers( 
   IReadOnlyCollection<Layer> layers
)
Public Sub SelectLayers( _
   ByVal layers As IReadOnlyCollection(Of Layer) _
) 

Parameters

layers
Example
Select all the feature layers in the TOC for the active map.
public void SelectAllFeatureLayersInTOC()
{
  //Get the active map view.
  var mapView = MapView.Active;
  if (mapView == null)
    return;

  //Zoom to the selected layers in the TOC
  var featureLayers = mapView.Map.Layers.OfType<FeatureLayer>();
  mapView.SelectLayers(featureLayers.ToList());
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

MapView Class
MapView Members