Module.ScopeName Tulajdonság
Definíció
Fontos
Egyes információk olyan, kiadás előtti termékekre vonatkoznak, amelyek a kiadásig még jelentősen módosulhatnak. A Microsoft nem vállal kifejezett vagy törvényi garanciát az itt megjelenő információért.
Lekéri a modul nevét képviselő sztringet.
public:
virtual property System::String ^ ScopeName { System::String ^ get(); };
public:
property System::String ^ ScopeName { System::String ^ get(); };
public virtual string ScopeName { get; }
public string ScopeName { get; }
member this.ScopeName : string
Public Overridable ReadOnly Property ScopeName As String
Public ReadOnly Property ScopeName As String
Tulajdonság értéke
A modul neve.
Példák
Ez a példa a , ScopeNameés FullyQualifiedName a Nametulajdonságok hatását mutatja be.
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
Megjegyzések
A ScopeName tulajdonságot nem használja a közös nyelvi futtatókörnyezet, de a metaadat-API-k használatával bármilyen sztringet tárolhat a tulajdonságban, amikor modult bocsát ki a metaadat-API-k használatával. Maga a tükröződés nem teszi lehetővé a tulajdonság beállítását ScopeName .