Type.IsNestedFamily 속성

Type이 중첩되었으며 자체 패밀리 내에서만 표시되는지 여부를 나타내는 값을 가져옵니다.

네임스페이스: System
어셈블리: mscorlib(mscorlib.dll)

구문

‘선언
Public ReadOnly Property IsNestedFamily As Boolean
‘사용 방법
Dim instance As Type
Dim value As Boolean

value = instance.IsNestedFamily
public bool IsNestedFamily { get; }
public:
virtual property bool IsNestedFamily {
    bool get () sealed;
}
/** @property */
public final boolean get_IsNestedFamily ()
public final function get IsNestedFamily () : boolean

속성 값

Type이 중첩되어 있고 자체 패밀리 내에서만 표시되면 true이고, 그렇지 않으면 false입니다.

설명

현재 Type이 제네릭 형식의 형식 매개 변수를 나타내는 경우 이 속성은 언제나 false를 반환합니다.

TypeAttributes.VisibilityMask에서는 표시 특성을 선택합니다.

Type 개체 패밀리는 정확히 동일한 Type 및 해당 하위 형식의 모든 개체로 정의됩니다.

예제

' Enclose a class.
Class MyClassA

  ' Protected nested class.
   Protected Class MyClassB
   End Class 'MyClassB
End Class 'MyClassA

Class MyTestClass
   Inherits MyClassA
   
   Public Shared Sub Main()
      ' Get the Type of the nested class.
      Dim myTypeB As Type = GetType(MyClassA.MyClassB)
      ' Get the 'IsNestedFamily' property the of the nested class
      ' 'Type'.
      Console.WriteLine((ControlChars.Cr + "The nested class has the property 'IsNestedFamily' value: " + myTypeB.IsNestedFamily.ToString()))
   End Sub 'Main
End Class 'MyTestClass
// Enclose a class.
class MyClassA
{
   // Protected nested class.
   protected class MyClassB
   {
   }   
}
class MyTestClass : MyClassA
{
   public static void Main(string[] args)
   {  
      // Get the Type of the nested class.
      Type myTypeB = typeof(MyClassA.MyClassB);
      // Get the 'IsNestedFamily' property the of the nested class
      // 'Type'.
      Console.WriteLine("\nThe nested class has the property 'IsNestedFamily' value: "+
                        myTypeB.IsNestedFamily.ToString());      
   }
}
// Enclose a class.
ref class MyClassA
{
protected:

   // Protected nested class.
   ref class MyClassB{};
};

ref class MyTestClass: public MyClassA
{
public:
   static void Test()
   {
      // Get the Type of the nested class.
      Type^ myTypeB = MyClassA::MyClassB::typeid;
      
      // Get the 'IsNestedFamily' property the of the nested class
      // 'Type'.
      Console::WriteLine( "\nThe nested class has the property 'IsNestedFamily' value: {0}", myTypeB->IsNestedFamily );
   }
};

int main()
{
   MyTestClass::Test();
}
// Enclose a class.
class MyClassA
{
    // Protected nested class.
    protected class MyClassB
    {
    } //MyClassB
} //MyClassA

class MyTestClass extends MyClassA
{
    public static void main(String[] args)
    {
        // Get the Type of the nested class.
        Type myTypeB = MyClassA.MyClassB.class.ToType();

        // Get the 'IsNestedFamily' property the of the nested class 'Type'.
        Console.WriteLine("\nThe nested class has the property "
            +"'IsNestedFamily' value: " 
            + System.Convert.ToString(myTypeB.get_IsNestedFamily()));
    } //main
} //MyTestClass

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

.NET Compact Framework

2.0, 1.0에서 지원

참고 항목

참조

Type 클래스
Type 멤버
System 네임스페이스
TypeAttributes