MetalamaAPI documentationAspect APIMetalama.​Framework.​Code­FixesCode­Fix­FactoryChange­Accessibility
Open sandboxFocus

CodeFixFactory.ChangeAccessibility Method

ChangeAccessibility(IMemberOrNamedType, Accessibility, String)

Creates a CodeFix that changes the accessibility of a given type or member.

public static CodeFix ChangeAccessibility(IMemberOrNamedType targetMember, Accessibility accessibility, string title = null)
Type Name Description
IMemberOrNamedType targetMember

The type or member whose accessibility must be changed.

Accessibility accessibility

The new accessibility.

System.String title

An optional title of the CodeFix, displayed to the user in the light bulb or refactoring menu. When not specified, the title is generated from the other parameters.

Type Description