Compartilhar via


Método RuntimeEnvironment.FromGlobalAccessCache (Assembly)

 

Dica

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Testa se o assembly especificado é carregado no cache de assembly global.

Namespace:   System.Runtime.InteropServices
Assembly:  mscorlib (em mscorlib.dll)

Sintaxe

public static bool FromGlobalAccessCache(
    Assembly a
)
public:
static bool FromGlobalAccessCache(
    Assembly^ a
)
static member FromGlobalAccessCache : 
        a:Assembly -> bool
Public Shared Function FromGlobalAccessCache (
    a As Assembly
) As Boolean

Parâmetros

Valor Retornado

Type: System.Boolean

true se o assembly for carregado no cache de assembly global; caso contrário, false.

Exemplos

O exemplo a seguir demonstra a chamar o FromGlobalAccessCache método. Este exemplo de código é parte de um exemplo maior fornecido para a RuntimeEnvironment classe.

// Show whether the EXE assembly was loaded from the GAC or from a private subdirectory.
Assembly assem = typeof(App).Assembly;
Console.WriteLine("Did the {0} assembly load from the GAC? {1}",
   assem, RuntimeEnvironment.FromGlobalAccessCache(assem));
' Show whether the EXE assembly was loaded from the GAC or from a private subdirectory.
Dim assem As Assembly = GetType(App).Assembly
Console.WriteLine("Did the {0} assembly load from the GAC? {1}", 
                  assem, RuntimeEnvironment.FromGlobalAccessCache(assem))
// Show whether the EXE assembly was loaded from the GAC or from a
// private subdirectory.
Console::WriteLine("Did the {0} assembly load from the GAC? {1}",
    Assembly::GetExecutingAssembly(),
    RuntimeEnvironment::FromGlobalAccessCache(
    Assembly::GetExecutingAssembly()));

Informações de Versão

.NET Framework
Disponível desde 1.1

Confira Também

Classe RuntimeEnvironment
Namespace System.Runtime.InteropServices

Retornar ao início