Share via


ImportAttribute Constructors

Definition

Overloads

ImportAttribute()

Initializes a new instance of the ImportAttribute class, importing the export with the default contract name.

ImportAttribute(String)

Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name.

ImportAttribute()

Source:
ImportAttribute.cs
Source:
ImportAttribute.cs
Source:
ImportAttribute.cs

Initializes a new instance of the ImportAttribute class, importing the export with the default contract name.

public ImportAttribute ();

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET Core 1.1, 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

ImportAttribute(String)

Source:
ImportAttribute.cs
Source:
ImportAttribute.cs
Source:
ImportAttribute.cs

Initializes a new instance of the ImportAttribute class, importing the export with the specified contract name.

public ImportAttribute (string contractName);

Parameters

contractName
String

The contract name of the export to import, or null or an empty string ("") to use the default contract name.

Applies to

.NET 9 (package-provided) and other versions
Product Versions
.NET Core 1.1, 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)