_Type.IsNestedPublic プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > _Type.IsNestedPublic プロパティの意味・解説 

_Type.IsNestedPublic プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

COM オブジェクトに、Type.IsNestedPublic プロパティへのバージョン依存しないアクセス用意されています。

このプロパティは、CLS準拠していません。  

名前空間: System.Runtime.InteropServices
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As _Type
Dim value As Boolean

value = instance.IsNestedPublic
bool IsNestedPublic { get; }
property bool IsNestedPublic {
    bool get ();
}
/** @property */
boolean get_IsNestedPublic ()
function get IsNestedPublic () : boolean

プロパティ
クラス入れ子になっていて、パブリックとして宣言されている場合trueそれ以外場合false

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

Type.IsNestedPublic プロパティ

クラス入れ子になっていて、パブリックとして宣言されているかどうかを示す値を取得します

名前空間: System
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Dim instance As Type
Dim value As Boolean

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

プロパティ
クラス入れ子になっていて、パブリックとして宣言されている場合trueそれ以外場合false

解説解説

現在の Typeジェネリック型型パラメータ表している場合、このプロパティは常に false返します

TypeAttributes.VisibilityMask は、参照可能範囲属性選択します

使用例使用例

入れ子になったパブリック クラス宣言し、その IsNestedPublic プロパティ値を表示する例を次に示します

Imports System
Imports Microsoft.VisualBasic
' Enclose a class.
Public Class MyClassA
    ' Public nested class.
    Public 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 IsNestedPublic property of the nested class.
        Console.WriteLine(ControlChars.Cr + "The IsNestedPublic
 property value of the nested class is {0}.", myTypeB.IsNestedPublic.ToString())
    End Sub 'Main
End Class 'MyClassA
using System;
// Enclose a class.
public class MyClassA
{
    // Public nested class.
    public class MyClassB
    {
    }
    public static void Main(string[]
 args)
    {    
        // Get the type of the nested class.
        Type myTypeB = typeof(MyClassA.MyClassB);
        // Get the IsNestedPublic property of the nested class.
        Console.WriteLine("\nThe IsNestedPublic property value of the nested
 class is {0}.", myTypeB.IsNestedPublic.ToString());   
         
    }
}
using namespace System;

// Enclose a class.
public ref class MyClassA
{
public:

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

int main()
{
   
   // Get the type of the nested class.
   Type^ myTypeB = MyClassA::MyClassB::typeid;
   
   // Get the IsNestedPublic property of the nested class.
   Console::WriteLine( "\nThe IsNestedPublic property value of the nested class
 is {0}.", myTypeB->IsNestedPublic.ToString() );
}
import System.*;

// Enclose a class.
public class MyClassA
{
    // Public nested class.
    public class MyClassB
    {
    } //MyClassB

    public static void main(String[]
 args)
    {
        // Get the type of the nested class.
        Type myTypeB = MyClassA.MyClassB.class.ToType();
        // Get the IsNestedPublic property of the nested class.
        Console.WriteLine("\nThe IsNestedPublic property value of the nested"
 
            + " class is {0}.", System.Convert.ToString(
            myTypeB.get_IsNestedPublic()));
    } //main
} //MyClassA
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」から_Type.IsNestedPublic プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書から_Type.IsNestedPublic プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書から_Type.IsNestedPublic プロパティを検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「_Type.IsNestedPublic プロパティ」の関連用語

_Type.IsNestedPublic プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



_Type.IsNestedPublic プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS