DefaultDependencyAttribute(LoadHint) Constructor

Definición

Inicializa una nueva instancia de la clase DefaultDependencyAttribute con el enlace LoadHint especificado.

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

Uno de los valores de LoadHint que indica el enlace predeterminado preferido.

Ejemplos

En el ejemplo de código siguiente se muestra cómo aplicar el DefaultDependencyAttribute atributo a un ensamblado para especificar que es probable que se cargue la dependencia.

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

Se aplica a