Skip to content

FieldInfoExtensions Class ​

Definition ​

Extension methods for FieldInfo.

c#
public static class FieldInfoExtensions

View source

Methods ​

NameDescription
GetAccessibility(FieldInfo)Returns the Accessibility of the specified FieldInfo.
IsConst(FieldInfo)Returns true if the field is const; false otherwise.
IsProtected(FieldInfo)Returns true if the field is protected as viewed from an external assembly, that is, its Accessibility is Protected or ProtectedInternal; false otherwise.
IsPublic(FieldInfo)Returns true if the field is public, that is, its Accessibility is Public; false otherwise.
IsPublicOrProtected(FieldInfo)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.
IsReadOnly(FieldInfo)Returns true if the field is readonly; false otherwise.