通过


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 允许指定可插入到公共字段或公共读/写属性返回的数组中的派生类型。

此类的实例由 XmlArrayItems 类的属性 XmlAttributes 返回。 重写 XmlAttributes 可插入到已应用对象的数组中的对象集 XmlArrayItemAttribute 时,将使用该类 XmlArrayAttribute

对于希望字段或属性接受的每个新类型,请创建一个XmlArrayItemAttribute对象并使用Add该属性返回的XmlArrayItems集合添加对象XmlArrayItemAttributesAdd XmlAttributeOverridesXmlAttributes指定包含字段或属性的对象的类型以及字段或属性的名称。 使用XmlAttributeOverrides之前调用SerializeDeserialize方法构造一个XmlSerializer

构造函数

名称 说明
XmlArrayItemAttributes()

初始化 XmlArrayItemAttributes 类的新实例。

属性

名称 说明
Capacity

获取或设置可包含的元素 CollectionBase 数。

(继承自 CollectionBase)
Count

获取包含在 . 中的 ICollection元素数。

Count

获取实例中包含的 CollectionBase 元素数。 无法重写此属性。

(继承自 CollectionBase)
InnerList

获取包含 ArrayList 实例中 CollectionBase 元素的列表。

(继承自 CollectionBase)
Item[Int32]

获取或设置指定索引处的项。

List

获取包含 IList 实例中 CollectionBase 元素的列表。

(继承自 CollectionBase)

方法

名称 说明
Add(XmlArrayItemAttribute)

向集合添加一个 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)

从集合中删除一个 XmlArrayItemAttribute (如果存在)。

RemoveAt(Int32)

IList删除指定索引处的项。

RemoveAt(Int32)

删除实例的指定索引处的 CollectionBase 元素。 此方法不可重写。

(继承自 CollectionBase)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

显式接口实现

名称 说明
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)

扩展方法

名称 说明
AsParallel(IEnumerable)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定类型。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

适用于

另请参阅