Module.ScopeName-Eigenschaft
Ruft eine Zeichenfolge ab, die den Namen des Moduls darstellt.
Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
Public ReadOnly Property ScopeName As String
'Usage
Dim instance As Module
Dim value As String
value = instance.ScopeName
public string ScopeName { get; }
public:
property String^ ScopeName {
String^ get ();
}
/** @property */
public String get_ScopeName ()
public function get ScopeName () : String
Eigenschaftenwert
Der Modulname.
Hinweise
Die ScopeName-Eigenschaft wird von der Common Language Runtime nicht verwendet. Sie können sie jedoch verwenden, um beim Ausgeben eines Moduls mithilfe der Metadaten-APIs beliebige Zeichenfolgen in der Eigenschaft zu speichern. Die Reflektion selbst lässt ein Festlegen der ScopeName-Eigenschaft nicht zu.
Beispiel
Dieses Beispiel veranschaulicht die Auswirkungen der Eigenschaften ScopeName, FullyQualifiedName und Name.
Imports System.Reflection
Imports System
Public Class Simple
Public Shared Sub Main()
Dim myMod As System.Reflection.Module = _
[Assembly].GetExecutingAssembly().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
' 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 = Assembly.GetExecutingAssembly().GetModules () [0];
Console.WriteLine ("Module Name is "
+ mod.Name);
Console.WriteLine ("Module FullyQualifiedName is "
+ mod.FullyQualifiedName);
Console.WriteLine ("Module ScopeName is "
+ mod.ScopeName);
}
}
/*
Produces this output:
Module Name is modname.exe
Module FullyQualifiedName is C:\Bin\modname.exe
Module ScopeName is modname.exe
*/
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
*/
import System.Reflection.*;
import System.*;
public class Simple
{
public static void main(String[] args)
{
Module mod = Assembly.GetExecutingAssembly().GetModules()[0];
Console.WriteLine(("Module Name is " + mod.get_Name()));
Console.WriteLine(("Module FullyQualifiedName is "
+ mod.get_FullyQualifiedName()));
Console.WriteLine(("Module ScopeName is " + mod.get_ScopeName()));
} //main
} //Simple
/*
Produces this output:
Module Name is modname.exe
Module FullyQualifiedName is C:\Bin\modname.exe
Module ScopeName is modname.exe
*/
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0