GetEffectiveAccessibility(IMember)
Gets the effective accessibility of a member, taking into account the accessibility of all containing types.
For example, a public method inside an internal class has an effective accessibility of internal.
Declaration
public static Accessibility GetEffectiveAccessibility(this IMember member)Parameters
| Type | Name | Description |
|---|---|---|
| IMember | member | The member. |
Returns
| Type | Description |
|---|---|
| Accessibility | The effective (minimum) accessibility considering all containing types. |
GetEffectiveAccessibility(IType)
Gets the effective accessibility of a type, taking into account the accessibility of containing types, element types (for arrays and pointers), and type arguments (for generic types).
Declaration
public static Accessibility GetEffectiveAccessibility(this IType type)Parameters
| Type | Name | Description |
|---|---|---|
| IType | type | The type. |
Returns
| Type | Description |
|---|---|
| Accessibility | The minimum effective accessibility across all component types. |