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
要包含的物件類型。
範例
以下範例將 twice 應用 SoapIncludeAttribute 於 XML 網路服務方法。 該方法回傳一個型態 Vehicle 為 的物件(基底類別)。 該 SoapIncludeAttribute 方法允許回傳從該 Vehicle 類別衍生出的類別實例。
備註
將多個 實例 SoapIncludeAttribute 套用到 一個欄位或屬性,該欄位或屬性會回傳一個物件陣列、包含物件集合的物件 ArrayList ,或是能回傳多個型別的物件。 為你想要的欄位或屬性包含的每種類型設定 Type 屬性。