C# Type IsNestedFamily
Description
Type IsNestedFamily
gets a value indicating whether
the Type is nested and visible only within its own family.
Syntax
Type.IsNestedFamily
has the following syntax.
public bool IsNestedFamily { get; }
Example
The following code example demonstrates how to use the IsNestedFamily property to determine whether a type is both nested and protected.
using System;//from ww w. j av a2 s.c o m
class MyClassA
{
protected class MyClassB
{
}
}
class MyTestClass : MyClassA
{
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine(myTypeB.IsNestedFamily.ToString());
}
}
The code above generates the following result.