Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft einen Wert ab, der angibt, ob Type geschachtelt und nur innerhalb der eigenen Familie sichtbar ist.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public ReadOnly Property IsNestedFamily As Boolean
'Usage
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
Eigenschaftenwert
true, wenn Type geschachtelt und nur innerhalb der eigenen Familie sichtbar ist, andernfalls false.
Hinweise
Wenn der aktuelle Type einen Typparameter eines generischen Typs darstellt, gibt diese Eigenschaft immer false zurück.
Die Sichtbarkeitsattribute werden mit TypeAttributes.VisibilityMask ausgewählt.
Alle Objekte vom genau gleichen Type und von seinen Untertypen definieren die Familie eines Type-Objekts.
Beispiel
' 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
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0, 1.0