Module.ScopeName 속성

정의

모듈의 이름을 나타내는 문자열을 가져옵니다.Gets a string representing the name of the module.

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

속성 값

모듈 이름입니다.The module name.

예제

이 예에서는 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 );
}

/*
Produces this 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);
   }
}
/*
The example displays output like the folloowing:
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 [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
' The example displays output like the following:
' Module Name is modname.exe
' Module FullyQualifiedName is C:\Bin\modname.exe
' Module ScopeName is modname.exe 

설명

ScopeName 속성은 공용 언어 런타임에서 사용 되지 않지만 메타 데이터 Api를 사용 하 여 모듈을 내보낼 때 속성에 원하는 문자열을 저장 하는 데 사용할 수 있습니다.The ScopeName property is not used by the common language runtime, but you can use it to store any string you want in the property when you emit a module using the metadata APIs. 리플렉션 자체는 ScopeName 속성을 설정 하는 것을 허용 하지 않습니다.Reflection itself does not allow you to set the ScopeName property.

적용 대상