DefaultDependencyAttribute(LoadHint) Construtor

Definição

Inicializa uma nova instância da classe DefaultDependencyAttribute com a associação LoadHint especificada.

public:
 DefaultDependencyAttribute(System::Runtime::CompilerServices::LoadHint loadHintArgument);
public DefaultDependencyAttribute (System.Runtime.CompilerServices.LoadHint loadHintArgument);
new System.Runtime.CompilerServices.DefaultDependencyAttribute : System.Runtime.CompilerServices.LoadHint -> System.Runtime.CompilerServices.DefaultDependencyAttribute
Public Sub New (loadHintArgument As LoadHint)

Parâmetros

loadHintArgument
LoadHint

Um dos valores LoadHint que indicam a preferência de associação padrão.

Exemplos

O exemplo de código a seguir demonstra como aplicar o DefaultDependencyAttribute atributo a um assembly para especificar que a dependência provavelmente será carregada.

using System;
using System.Runtime.CompilerServices;

[assembly: DefaultDependencyAttribute(LoadHint.Always)]
class Program
{

    static void Main(string[] args)
    {

        Console.WriteLine("The DefaultDependencyAttribute attribute was applied.");
    }
}
Imports System.Runtime.CompilerServices

<Assembly: DefaultDependencyAttribute(LoadHint.Always)> 
Module Program


    Sub Main(ByVal args() As String)
        Console.WriteLine("The DefaultDependencyAttribute attribute was applied.")
    End Sub


End Module

Aplica-se a