Description
The IsFamily
property of the MemberDescription
class indicates whether the member is accessible within its class and by derived class instances. This property returns a boolean value, where true
signifies that the member has family-level accessibility, and false
indicates otherwise.
Usage
Use the IsFamily
property to determine if a member of a class is accessible to derived classes. This can be particularly useful when reflecting over a type's members to understand their accessibility levels.
Example
// Example of using the IsFamily property
MemberDescription memberDescription = ...; // Assume this is initialized
if (memberDescription.IsFamily)
{
// The member is accessible within its class and by derived classes
// Perform operations knowing the member has family-level accessibility
}
else
{
// The member is not accessible by derived classes
}