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



入れ子になったクラスをプライベートとして宣言し、その入れ子になったクラスの IsNestedPrivate プロパティ値を表示する例を次に示します。
Imports System Imports Microsoft.VisualBasic ' Outer class. Public Class MyClassA ' Private nested class. Private Class MyClassB End Class 'MyClassB Public Shared Sub Main() ' Get the type of the nested class. Dim myTypeB As Type = GetType(MyClassA.MyClassB) ' Get the IsNestedPrivate property of the nested class. Console.WriteLine(ControlChars.Cr + "The IsNestedPrivate property value of the nested class is {0}.", myTypeB.IsNestedPrivate.ToString()) End Sub 'Main End Class 'MyClassA
using System; // Outer class. public class MyClassA { // Private nested class. private class MyClassB { } public static void Main(string[] args) { // Get the type of the nested class. Type myTypeB = typeof(MyClassA.MyClassB); // Get the IsNestedPrivate property of the nested class. Console.WriteLine("\nThe IsNestedPrivate property value of the nested class is {0}.", myTypeB.IsNestedPrivate.ToString()); } }
using namespace System; // Outer class. public ref class MyClassA { private: // Private nested class. ref class MyClassB{}; public: static void Test() { // Get the type of the nested class. Type^ myTypeB = MyClassA::MyClassB::typeid; // Get the IsNestedPrivate property of the nested class. Console::WriteLine( "\nThe IsNestedPrivate property value of the nested class is {0}.", myTypeB->IsNestedPrivate ); } }; int main() { MyClassA::Test(); }
import System.*; // Outer class. public class MyClassA { // Private nested class. private class MyClassB { } //MyClassB public static void main(String[] args) { // Get the type of the nested class. Type myTypeB = MyClassA.MyClassB.class.ToType(); // Get the IsNestedPrivate property of the nested class. Console.WriteLine("\nThe IsNestedPrivate property value of the nested" +" class is {0}.", System.Convert.ToString(myTypeB.get_IsNestedPrivate())); } //main } //MyClassA

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.IsNestedPrivate プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

Type が入れ子になっていて、プライベートとして宣言されている場合は true。それ以外の場合は false。

このプロパティは、アンマネージ コードからマネージ クラスにアクセスするためのプロパティであるため、マネージ コードからは呼び出さないでください。
Type.IsNestedPrivate プロパティは、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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からType.IsNestedPrivateを検索する場合は、下記のリンクをクリックしてください。

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