C# Type IsNestedFamORAssem
Description
Type IsNestedFamORAssem
gets a value indicating whether
the Type is nested and visible only to classes that belong to either its own
family or to its own assembly.
Syntax
Type.IsNestedFamORAssem
has the following syntax.
public bool IsNestedFamORAssem { get; }
Example
The following example declares a nested class with visibility in its own family or in its own assembly and displays IsNestedFamORAssem property value of the nested class.
using System;/* w w w . j a v a 2s . c om*/
// Enclose a class.
class MyClassA
{
protected internal class MyClassB
{
}
}
class MyTestClass
{
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine(myTypeB.IsNestedFamANDAssem.ToString());
}
}
The code above generates the following result.