DefaultDependencyAttribute(LoadHint) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the DefaultDependencyAttribute class with the specified LoadHint binding.
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)
Parameters
Examples
The following code example demonstrates how to apply the DefaultDependencyAttribute attribute to an assembly to specify that the dependency is likely to be loaded.
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
Applies to
Συνεργαστείτε μαζί μας στο GitHub
Μπορείτε να βρείτε την πηγή για αυτό το περιεχόμενο στο GitHub, όπου μπορείτε επίσης να δημιουργήσετε και να εξετάσετε ζητήματα και αιτήματα έλξης. Για περισσότερες πληροφορίες, ανατρέξτε στον οδηγό συνεργατών.