Type.IsNestedAssembly プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)



自身のアセンブリ内で参照できる入れ子になったクラスを宣言し、その IsNestedAssembly プロパティ値を表示する例を次に示します。
Imports System Imports Microsoft.VisualBasic ' Nest a class. Class MyClassA 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 IsNestedAssembly property of the nested class. Console.WriteLine(ControlChars.Cr + "The IsNestedAssembly property value of MyClassB is {0}.", myTypeB.IsNestedAssembly.ToString()) End Sub 'Main End Class 'MyTestClass
using System; // Nest a class. class MyClassA { 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 IsNestedAssembly property of the nested class. Console.WriteLine("\nThe IsNestedAssembly property value of MyClassB is {0}.", myTypeB.IsNestedAssembly.ToString()); } }
using namespace System; // Nest a class. ref class MyClassA { internal: ref class MyClassB{}; }; int main() { // Get the type of the nested class. Type^ myTypeB = MyClassA::MyClassB::typeid; // Get the IsNestedAssembly property of the nested class. Console::WriteLine( "\nThe IsNestedAssembly property value of MyClassB is {0}.", myTypeB->IsNestedAssembly ); }
import System.*; // Nest a class. class MyClassA { class MyClassB { } //MyClassB } //MyClassA class MyTestClass { public static void main(String[] args) { // Get the type of the nested class. Type myTypeB = MyClassA.MyClassB.class.ToType(); // Get the IsNestedAssembly property of the nested class. Console.WriteLine("\nThe IsNestedAssembly property value of " +"MyClassB is {0}.",System.Convert.ToString( myTypeB.get_IsNestedAssembly())); } //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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


_Type.IsNestedAssembly プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

Type が入れ子になっていて、それ自体が属するアセンブリ内でだけ参照可能な場合は true。それ以外の場合は false。

このプロパティは、アンマネージ コードからマネージ クラスにアクセスするためのプロパティであるため、マネージ コードからは呼び出さないでください。
Type.IsNestedAssembly プロパティは、Type が入れ子になっていて、それ自体が属するアセンブリ内でだけ参照可能かどうかを示す値を取得します。

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- Type.IsNestedAssemblyのページへのリンク