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

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

_Type.IsNestedAssembly プロパティ

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

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

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

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

Dim instance As _Type
Dim value As Boolean

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

プロパティ
Type入れ子になっていて、それ自体属すアセンブリ内でだけ参照可能な場合trueそれ以外場合false

解説解説

このプロパティは、アンマネージ コードからマネージ クラスアクセスするためのプロパティであるため、マネージ コードからは呼び出さないください

Type.IsNestedAssembly プロパティは、Type入れ子になっていて、それ自体属すアセンブリ内でだけ参照可能かどうかを示す値を取得します

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

Type.IsNestedAssembly プロパティ

Type入れ子になっていて、それ自体属すアセンブリ内でだけ参照可能かどうかを示す値を取得します

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

Dim instance As Type
Dim value As Boolean

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

プロパティ
Type入れ子になっていて、それ自体属すアセンブリ内でだけ参照可能な場合trueそれ以外場合false

解説解説

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

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

使用例使用例

自身アセンブリ内で参照できる入れ子になったクラス宣言し、その 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

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

   

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



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

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

©2024 GRAS Group, Inc.RSS