C# Type IsNestedAssembly
Description
Type IsNestedAssembly
gets a value indicating whether
the Type is nested and visible only within its own assembly.
Syntax
Type.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.
using System;/*from w ww . j a v a 2 s. c o m*/
// Nest a class.
class MyClassA
{
internal class MyClassB
{
}
}
class MyTestClass
{
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine(myTypeB.IsNestedAssembly.ToString());
}
}
The code above generates the following result.