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.

SoapIncludeAttribute Constructor (Type^)

 

Initializes a new instance of the SoapIncludeAttribute class using the specified type.

Namespace:   System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)

public:
SoapIncludeAttribute(
	Type^ type
)

Parameters

type
Type: System::Type^

The type of the object to include.

Apply multiple instances of the SoapIncludeAttribute to a field or property that returns either an array of objects, an ArrayList that contains a collection of objects, or an object that can return multiple types. Set the Type property for each type that you want the field or property to contain.

The following example applies the SoapIncludeAttribute twice to an XML Web services method. The method returns an object of type Vehicle (a base class). The SoapIncludeAttribute allows the method to return instances of classes derived from the Vehicle class.

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft