Bewerken

ImportingConstructorAttribute Class

Definition

Specifies which constructor should be used when creating a part.

public ref class ImportingConstructorAttribute : Attribute
[System.AttributeUsage(System.AttributeTargets.Constructor, AllowMultiple=false, Inherited=false)]
public class ImportingConstructorAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Constructor, AllowMultiple=false, Inherited=false)>]
type ImportingConstructorAttribute = class
    inherit Attribute
Public Class ImportingConstructorAttribute
Inherits Attribute
Inheritance
ImportingConstructorAttribute
Attributes

Remarks

By default, only a parameter-less constructor will be used to construct an attributed part. Use ImportingConstructorAttribute to indicate that a specific constructor should be used instead. Parameters to the decorated constructor will be treated as imports.

Constructors

Name Description
ImportingConstructorAttribute()

Initializes a new instance of the ImportingConstructorAttribute class.

Applies to