SoapIncludeAttribute(Type) 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的类型初始化类的新实例 SoapIncludeAttribute 。
public:
SoapIncludeAttribute(Type ^ type);
public SoapIncludeAttribute(Type type);
new System.Xml.Serialization.SoapIncludeAttribute : Type -> System.Xml.Serialization.SoapIncludeAttribute
Public Sub New (type As Type)
参数
- type
- Type
要包含的对象的类型。
示例
以下示例将 SoapIncludeAttribute 两次应用于 XML Web 服务方法。 该方法返回类型 Vehicle (基类)的对象。 允许 SoapIncludeAttribute 该方法返回派生自 Vehicle 该类的类的实例。
注解
将多个实例 SoapIncludeAttribute 应用于返回对象数组、 ArrayList 包含对象的集合或可返回多个类型的对象的字段或属性。 Type设置希望字段或属性包含的每个类型的属性。