C# TypeInfo IsNestedFamORAssem

Description

TypeInfo 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

TypeInfo.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.


//from ww  w.jav a 2 s .  c  o m
using System;

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.





















Home »
  C# Tutorial »
    System.Reflection »




EventInfo
FieldInfo
MemberInfo
MethodInfo
ParameterInfo
TypeInfo