ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / Layer Class / IsVisible Property
Example Version

IsVisible Property (Layer)
Gets the layer's visibility state.
Syntax
public bool IsVisible {get;}
Example
Change layer visibility, editability, snappability
if (!layer.IsVisible)
  layer.SetVisibility(true);

if (layer is FeatureLayer featureLayer)
{
  if (!featureLayer.IsEditable)
    featureLayer.SetEditable(true);

  if (!featureLayer.IsSnappable)
    featureLayer.SetSnappable(true);
}
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also