Düzenle

Aracılığıyla paylaş


SoapIncludeAttribute.Type Property

Definition

Gets or sets the type of the object to use when serializing or deserializing an object.

public:
 property Type ^ Type { Type ^ get(); void set(Type ^ value); };
public Type Type { get; set; }
member this.Type : Type with get, set
Public Property Type As Type

Property Value

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.

Applies to