DefaultDependencyAttribute(LoadHint) コンストラクター

定義

指定したDefaultDependencyAttribute バインディングを使用して、LoadHint クラスの新しいインスタンスを初期化します。

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)

パラメーター

loadHintArgument
LoadHint

既定のバインディング設定を示す LoadHint 値の 1 つ。

次のコード例では、依存関係が読み込まれる可能性が高い DefaultDependencyAttribute 属性をアセンブリに適用する方法を示します。

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

適用対象