C# TypeInfo IsNestedPrivate
Description
TypeInfo IsNestedPrivate
Gets a value indicating whether
the Type is nested and declared private.
Syntax
TypeInfo.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.
/* www .ja v a 2 s . co m*/
using System;
public class MyClassA
{
private class MyClassB
{
}
public static void Main(string[] args)
{
Type myTypeB = typeof(MyClassA.MyClassB);
Console.WriteLine(myTypeB.IsNestedPrivate.ToString());
}
}
The code above generates the following result.