共用方式為


XmlArrayItemAttributes 類別

定義

代表一組 XmlArrayItemAttribute 物件。

public ref class XmlArrayItemAttributes : System::Collections::IList
public ref class XmlArrayItemAttributes : System::Collections::CollectionBase
public class XmlArrayItemAttributes : System.Collections.IList
public class XmlArrayItemAttributes : System.Collections.CollectionBase
type XmlArrayItemAttributes = class
    interface ICollection
    interface IEnumerable
    interface IList
type XmlArrayItemAttributes = class
    inherit CollectionBase
Public Class XmlArrayItemAttributes
Implements IList
Public Class XmlArrayItemAttributes
Inherits CollectionBase
繼承
XmlArrayItemAttributes
繼承
XmlArrayItemAttributes
實作

備註

這個 XmlArrayItemAttributes 類別允許你指定可以插入到由 public field 或 public read/write 屬性回傳的陣列中的派生型別。

此類別的實例由該XmlAttributes類別的屬性回傳XmlArrayItems。 該 XmlAttributes 類別用於覆寫可插入陣列的物件集合 XmlArrayItemAttribute ,而該陣列已套用該 XmlArrayAttribute 陣列。

對於你希望欄位或屬性接受的每個新類型,建立一個 XmlArrayItemAttribute 並使用 來Add將該物件加入該XmlArrayItems屬性回傳的XmlArrayItemAttributes集合。 AddXmlAttributesXmlAttributeOverrides,指定包含該欄位或屬性的物件型別,以及欄位或屬性的名稱。 先用 建構 a XmlSerializerXmlAttributeOverrides ,再呼叫 or SerializeDeserialize 方法。

建構函式

名稱 Description
XmlArrayItemAttributes()

初始化 XmlArrayItemAttributes 類別的新執行個體。

屬性

名稱 Description
Capacity

取得或設定 可以 CollectionBase 包含的元素數量。

(繼承來源 CollectionBase)
Count

得到包含於 的 ICollection元素數量。

Count

取得該實例中包含 CollectionBase 的元素數量。 此屬性無法覆寫。

(繼承來源 CollectionBase)
InnerList

取得包含實ArrayList例中元素清單的 。CollectionBase

(繼承來源 CollectionBase)
Item[Int32]

取得或設定項目在指定的索引位置。

List

取得包含實IList例中元素清單的 。CollectionBase

(繼承來源 CollectionBase)

方法

名稱 Description
Add(XmlArrayItemAttribute)

為收藏增添 a XmlArrayItemAttribute

Clear()

移除所有項目。IList

Clear()

移除實例中 CollectionBase 的所有物件。 此方法無法被覆蓋。

(繼承來源 CollectionBase)
Contains(XmlArrayItemAttribute)

判斷集合是否包含指定的 XmlArrayItemAttribute

CopyTo(XmlArrayItemAttribute[], Int32)

從指定的目標索引開始,將 XmlArrayItemAttribute 陣列複製到集合。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEnumerator()

傳回逐一查看集合的列舉值。

GetEnumerator()

回傳一個枚舉器,會遍歷該 CollectionBase 實例。

(繼承來源 CollectionBase)
GetHashCode()

做為預設哈希函式。

(繼承來源 Object)
GetType()

取得目前實例的 Type

(繼承來源 Object)
IndexOf(XmlArrayItemAttribute)

回傳集合中指定值首次出現 XmlArrayItemAttribute 時的零索引,若該屬性未在集合中,則回傳 -1。

Insert(Int32, XmlArrayItemAttribute)

在指定的索引中插入 。XmlArrayItemAttribute

MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
OnClear()

在清除實例內容 CollectionBase 時執行額外的自訂程序。

(繼承來源 CollectionBase)
OnClearComplete()

清除實例內容 CollectionBase 後,執行額外的自訂程序。

(繼承來源 CollectionBase)
OnInsert(Int32, Object)

在插入新元素前 CollectionBase ,執行額外的自訂程序。

(繼承來源 CollectionBase)
OnInsertComplete(Int32, Object)

插入新元素後 CollectionBase 執行額外的自訂程序。

(繼承來源 CollectionBase)
OnRemove(Int32, Object)

移除實例中的 CollectionBase 元素時,會執行額外的自訂程序。

(繼承來源 CollectionBase)
OnRemoveComplete(Int32, Object)

移除實 CollectionBase 例元素後,執行額外的自訂程序。

(繼承來源 CollectionBase)
OnSet(Int32, Object, Object)

在設定實例值 CollectionBase 前,執行額外的自訂程序。

(繼承來源 CollectionBase)
OnSetComplete(Int32, Object, Object)

在實例設定值 CollectionBase 後,執行額外的自訂程序。

(繼承來源 CollectionBase)
OnValidate(Object)

在驗證值時執行額外的自訂流程。

(繼承來源 CollectionBase)
Remove(XmlArrayItemAttribute)

如果 a XmlArrayItemAttribute 存在,則從集合中移除。

RemoveAt(Int32)

移除 IList 指定索引的項目。

RemoveAt(Int32)

移除實例指定索引 CollectionBase 的元素。 此方法無法被覆蓋。

(繼承來源 CollectionBase)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)

明確介面實作

名稱 Description
ICollection.CopyTo(Array, Int32)

從特定 ICollection 索引開始,將 Array 的專案複製到 Array

ICollection.CopyTo(Array, Int32)

從目標陣列指定的索引開始,將整個 CollectionBase 複製到相容的一維 Array

(繼承來源 CollectionBase)
ICollection.IsSynchronized

取得值,指出是否同步存取 ICollection (線程安全)。

ICollection.IsSynchronized

取得值,指出是否同步存取 CollectionBase (線程安全)。

(繼承來源 CollectionBase)
ICollection.SyncRoot

取得對象,這個物件可用來同步存取 ICollection

ICollection.SyncRoot

取得對象,這個物件可用來同步存取 CollectionBase

(繼承來源 CollectionBase)
IList.Add(Object)

將一個項目加入 IList

IList.Add(Object)

在 的末尾 CollectionBase加上一個物件。

(繼承來源 CollectionBase)
IList.Contains(Object)

判斷是否 IList 包含特定值。

IList.Contains(Object)

判斷是否 CollectionBase 包含特定元素。

(繼承來源 CollectionBase)
IList.IndexOf(Object)

決定特定項目的 IList索引。

IList.IndexOf(Object)

搜尋指定的 Object ,並返回整個 CollectionBase中首次出現的零基索引。

(繼承來源 CollectionBase)
IList.Insert(Int32, Object)

在指定的索引處插入一個項目 IList

IList.Insert(Int32, Object)

在指定的索引處插入一個元素 CollectionBase

(繼承來源 CollectionBase)
IList.IsFixedSize

會得到一個值,表示 是否 IList 具有固定大小。

IList.IsFixedSize

會得到一個值,表示 是否 CollectionBase 具有固定大小。

(繼承來源 CollectionBase)
IList.IsReadOnly

取得值,指出 IList 是否為唯讀。

IList.IsReadOnly

取得值,指出 CollectionBase 是否為唯讀。

(繼承來源 CollectionBase)
IList.Item[Int32]

取得或設定位於指定索引處的專案。

IList.Item[Int32]

取得或設定位於指定索引處的專案。

(繼承來源 CollectionBase)
IList.Remove(Object)

移除特定物件 IList首次出現的 。

IList.Remove(Object)

移除特定物件 CollectionBase首次出現的 。

(繼承來源 CollectionBase)

擴充方法

名稱 Description
AsParallel(IEnumerable)

啟用查詢的平行處理。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別篩選 IEnumerable 的專案。

適用於

另請參閱