Skip to content

FieldInfoExtensions.IsPublicOrProtected Method ​

Definition ​

Returns true if the field is public or protected as viewed from an external assembly, that is, its Accessibility is Public, Protected or ProtectedInternal; false otherwise.

c#
public static bool IsPublicOrProtected(this FieldInfo field);

View source

Parameters ​

NameTypeDescription
fieldFieldInfoThe field.

Returns ​

Boolean

true if the field is Public, Protected or ProtectedInternal; false otherwise.