Type.IsNestedFamANDAssem Property
Gets a value indicating whether the Type is nested and visible only to classes that belong to both its own family and its own assembly.
[Visual Basic] Public ReadOnly Property IsNestedFamANDAssem As Boolean [C#] public bool IsNestedFamANDAssem {get;} [C++] public: __property bool get_IsNestedFamANDAssem(); [JScript] public function get IsNestedFamANDAssem() : Boolean;
Property Value
true if the Type is nested and visible only to classes that belong to both its own family and its own assembly; otherwise, false.
Remarks
The VisibilityMask selects the visibility attributes.
A Type object's family is defined as all objects of the exact same Type and of its subtypes.
Example
[Visual Basic, C#, C++] The following example demonstrates a use of the IsNestedFamANDAssem property.
[Visual Basic] Imports System Imports Microsoft.VisualBasic ' Enclose a class. Class MyClassA ' Protected friend nested class. Protected Friend Class MyClassB End Class 'MyClassB End Class 'MyClassA Class MyTestClass Public Shared Sub Main() ' Get the type of the nested class. Dim myTypeB As Type = GetType(MyClassA.MyClassB) ' Get the IsNestedFamANDAssem property of the nested class. Console.WriteLine(ControlChars.Cr + "The IsNestedFamANDAssem property value of the nested class is {0}.", myTypeB.IsNestedFamANDAssem.ToString()) End Sub 'Main End Class 'MyTestClass [C#] using System; // Enclose a class. class MyClassA { protected internal class MyClassB { } } class MyTestClass { public static void Main(string[] args) { // Get the type of the nested class. Type myTypeB = typeof(MyClassA.MyClassB); // Get the IsNestedFamANDAssem property of the nested class. Console.WriteLine("\nThe IsNestedFamANDAssem property value of the nested class is {0}.", myTypeB.IsNestedFamANDAssem.ToString()); } } [C++] #using <mscorlib.dll> using namespace System; // Enclose a class. __gc class MyClassA { protected public: __gc class MyClassB { }; }; int main() { // Get the type of the nested class. Type* myTypeB = __typeof(MyClassA::MyClassB); // Get the IsNestedFamANDAssem property of the nested class. Console::WriteLine(S"\nThe IsNestedFamANDAssem property value of the nested class is {0}.", __box( myTypeB->IsNestedFamANDAssem)); }
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard
See Also
Type Class | Type Members | System Namespace | TypeAttributes