C# Type IsNestedPrivate
Description
Type IsNestedPrivate
gets a value indicating whether
the Type is nested and declared private.
Syntax
Type.IsNestedPrivate
has the following syntax.
public bool IsNestedPrivate { get; }
Example
The following example declares a nested class as private and displays the IsNestedPrivate property value of the nested class.
// w ww .ja va 2s .c o m
using System;
public class MyClassA
{
private class MyClassB
{
}
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine("\nThe IsNestedPrivate property value of the nested class is {0}.", myTypeB.IsNestedPrivate.ToString());
}
}
The code above generates the following result.