ArcGIS Pro SDK C#
if (!layer.IsVisible)
layer.SetVisibility(true);
if (layer is FeatureLayer featureLayer)
{
if (!featureLayer.IsEditable)
featureLayer.SetEditable(true);
if (!featureLayer.IsSnappable)
featureLayer.SetSnappable(true);
}