Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ImportAttribute::AllowDefault Property

.NET Framework (current version)
 

Gets or sets a value that indicates whether the property, field, or parameter will be set to its type's default value when an export with the contract name is not present in the container.

Namespace:   System.Composition
Assembly:  System.Composition.AttributedModel (in System.Composition.AttributedModel.dll)

public:
property bool AllowDefault {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true if the property, field, or parameter will be set to its type's default value when there is no export with the contract name in the host container; otherwise, false. The default is false.

Return to top
Show:
© 2017 Microsoft