SoapIncludeAttribute(Type) 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 SoapIncludeAttribute class using the specified type.
public:
SoapIncludeAttribute(Type ^ type);
public SoapIncludeAttribute (Type type);
new System.Xml.Serialization.SoapIncludeAttribute : Type -> System.Xml.Serialization.SoapIncludeAttribute
Public Sub New (type As Type)
Parameters
- type
- Type
The type of the object to include.
Examples
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.
Remarks
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.