C# TypeInfo IsNestedAssembly
Description
TypeInfo IsNestedAssembly
Gets a value indicating whether
the Type is nested and visible only within its own assembly.
Syntax
TypeInfo.IsNestedAssembly
has the following syntax.
public bool IsNestedAssembly { get; }
Example
The following example declares a nested class with visibility in its own assembly, and displays its IsNestedAssembly property value.
//from ww w . j a v a 2 s . co m
using System;
class MyClassA
{
internal class MyClassB
{
}
}
class MyTestClass
{
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine("\nThe IsNestedAssembly property value of MyClassB is {0}.", myTypeB.IsNestedAssembly.ToString());
}
}
The code above generates the following result.