次の方法で共有


Module.FullyQualifiedName プロパティ

このモジュールの完全限定名とパスを表す文字列を取得します。

Public Overridable ReadOnly Property FullyQualifiedName As String
[C#]
public virtual string FullyQualifiedName {get;}
[C++]
public: __property virtual String* get_FullyQualifiedName();
[JScript]
public function get FullyQualifiedName() : String;

プロパティ値

モジュールの完全限定名。

例外

例外の種類 条件
SecurityException 呼び出し元に、必要なアクセス許可がありません。

解説

パスを含まない名前を取得するには、 Name を使用します。

このモジュールのアセンブリがバイト配列から読み込まれた場合、モジュールの FullyQualifiedName は <Unknown> になります。

メモ   モジュール名の大文字小文字の区別は、プラットフォームに依存します。

使用例

[Visual Basic, C#, C++] 指定したモジュールの完全限定名を表示する例を次に示します。

 
Imports System
Imports System.Reflection

Namespace ReflectionModule_Examples
    Class MyMainClass
        Shared Sub Main()
            Dim moduleArray() As [Module]

            moduleArray = [Assembly].GetExecutingAssembly().GetModules(False)

            ' In a simple project with only one module, the module at index
            ' 0 will be the module containing this class.
            Dim myModule As [Module] = moduleArray(0)

            Console.WriteLine("myModule.FullyQualifiedName = {0}", myModule.FullyQualifiedName)
        End Sub 'Main
    End Class 'MyMainClass
End Namespace 'ReflectionModule_Examples

[C#] 
using System;
using System.Reflection;

namespace ReflectionModule_Examples
{
    class MyMainClass
    {
        static void Main()
        {
            Module[] moduleArray;
            
            moduleArray = Assembly.GetExecutingAssembly().GetModules(false);
            
            // In a simple project with only one module, the module at index
            // 0 will be the module containing this class.
            Module myModule = moduleArray[0];

            Console.WriteLine("myModule.FullyQualifiedName = {0}", myModule.FullyQualifiedName);
        }
    }
}

[C++] 
#using <mscorlib.dll>

using namespace System;
using namespace System::Reflection;

int main()
{
   Module* moduleArray[];

   moduleArray = Assembly::GetExecutingAssembly()->GetModules(false);

   // In a simple project with only one module, the module at index
   // 0 will be the module containing this class.
   Module* myModule = moduleArray[0];

   Console::WriteLine(S"myModule.FullyQualifiedName = {0}", myModule->FullyQualifiedName);
}

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET, Common Language Infrastructure (CLI) Standard

.NET Framework セキュリティ:

参照

Module クラス | Module メンバ | System.Reflection 名前空間