Module.Name 속성

정의

경로가 제거된 모듈의 이름을 나타내는 String을 가져옵니다.Gets a String representing the name of the module with the path removed.

public:
 property System::String ^ Name { System::String ^ get(); };
public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

속성 값

경로가 없는 모듈 이름입니다.The module name with no path.

예제

이 예에서는 ScopeName, FullyQualifiedNameName 속성의 효과를 보여 줍니다.This example shows the effect of the ScopeName, FullyQualifiedName, and Name properties.

using namespace System;
using namespace System::Reflection;
int main()
{
   Module^ mod = Assembly::GetExecutingAssembly()->GetModules()[ 0 ];
   Console::WriteLine( "Module Name is {0}", mod->Name );
   Console::WriteLine( "Module FullyQualifiedName is {0}", mod->FullyQualifiedName );
   Console::WriteLine( "Module ScopeName is {0}", mod->ScopeName );
}

/*
This code produces the following output:

Module Name is modname.exe
Module FullyQualifiedName is C:\Bin\modname.exe
Module ScopeName is modname.exe
*/
using System.Reflection;
using System;
 
 public class Simple
 {
    public static void Main ()
    {
         Module mod = typeof(Simple).Assembly.GetModules () [0];
         Console.WriteLine ("Module Name is " + mod.Name);
         Console.WriteLine ("Module FullyQualifiedName is " + mod.FullyQualifiedName);
         Console.WriteLine ("Module ScopeName is " + mod.ScopeName);
    }
 }
 /*
 This code produces output like the following:

 Module Name is modname.exe
 Module FullyQualifiedName is C:\Bin\modname.exe
 Module ScopeName is modname.exe
 */
Imports System.Reflection

Public Class Simple
    Public Shared Sub Main()
        Dim myMod As System.Reflection.Module = 
           GetType(Simple).Assembly.GetModules()(0)
        Console.WriteLine("Module Name is " + myMod.Name)
        Console.WriteLine("Module FullyQualifiedName is " _
           + myMod.FullyQualifiedName)
        Console.WriteLine("Module ScopeName is " + myMod.ScopeName)
    End Sub
    
End Class
' This code produces output like the following:
'       Module Name is modname.exe
'       Module FullyQualifiedName is C:\Bin\modname.exe
'       Module ScopeName is modname.exe 

설명

Name는 플랫폼에 종속 된 문자열입니다.Name is a platform-dependent string.

이 모듈에 대 한 어셈블리가 바이트 배열에서 로드 된 경우 모듈의 FullyQualifiedName <알 수 없는 > 됩니다.If the assembly for this module was loaded from a byte array then the FullyQualifiedName for the module will be: <Unknown>.

이름 및 경로를 가져오려면 FullyQualifiedName를 사용 합니다.To get the name and the path, use FullyQualifiedName.

적용 대상