PrincipalValueCollection<T> 类

定义

多值属性(如 PermittedWorkstations)具有一个 PrincipalValueCollection<T> 类型的值。Multi-valued properties, such as PermittedWorkstations, have a value of the type PrincipalValueCollection<T>. 此类提供用于枚举和操作这些值的方法。This class provides methods to enumerate and manipulate those values.

generic <typename T>
public ref class PrincipalValueCollection : System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList
public class PrincipalValueCollection<T> : System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList
type PrincipalValueCollection<'T> = class
    interface IList<'T>
    interface ICollection<'T>
    interface seq<'T>
    interface IEnumerable
    interface IList
    interface ICollection
Public Class PrincipalValueCollection(Of T)
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T)

类型参数

T
继承
PrincipalValueCollection<T>
实现

属性

Count

获取集合中的对象数。Gets the number of objects in the collection.

IsFixedSize

获取一个 bool,表示集合大小是否固定。Gets a bool that represents whether or not the collection is fixed in size.

IsReadOnly

获取一个 bool,表示集合是否为只读。Gets a bool that represents whether or not the collection is read-only.

IsSynchronized

获取一个值,该值指示对集合的访问是否为同步的(线程安全)。Gets a value indicating whether access to the collection is synchronized (thread safe).

Item[Int32]

获取集合中指定索引处的对象。Gets the object at the specified index in the collection.

SyncRoot

获取可用于同步对集合的访问的对象。Gets an object that can be used to synchronize access to the collection.

方法

Add(T)

将指定的值添加到集合的末尾。Adds the specified value to the end of the collection.

Clear()

清除集合的内容。Clears the contents of the collection.

Contains(T)

如果指定的对象在集合中,则返回 true;否则返回 falseReturns true if the specified object is in the collection, and false otherwise.

CopyTo(T[], Int32)

从数组中的指定位置开始,将集合中的内容复制到指定的数组。Copies the contents of the collection to the specified array, starting at the specified position in the array.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回一个可用于循环访问集合的枚举数。Returns an enumerator that can be used to iterate through the collection.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(T)

返回指定对象的索引;如果该对象不在集合中,则返回 -1。Returns the index of the specified object, or -1 if the object is not in the collection.

Insert(Int32, T)

将指定对象插入集合中的指定索引处。Inserts the specified object into the collection at the specified index.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Remove(T)

从集合中删除指定的对象。Removes the specified object from the collection.

RemoveAt(Int32)

从集合的指定索引处删除对象。Removes the object at the specified index from the collection.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式界面实现

ICollection.CopyTo(Array, Int32)

从指定索引处开始,将集合内容复制到指定数组中。Copies the contents of the collection to the specified array, starting at the specified index.

ICollection.Count

获取集合中的对象数。Gets the number of objects in the collection.

ICollection.IsSynchronized

获取一个值,该值指示对集合的访问是否为同步的(线程安全)。Gets a value indicating whether access to the collection is synchronized (thread safe).

ICollection.SyncRoot

获取可用于同步对集合的访问的对象。Gets an object that can be used to synchronize access to the collection.

IEnumerable.GetEnumerator()

返回迭代集合的一个枚举数。Returns an enumerator for iterating through the collection.

IList.Add(Object)

将指定的对象添加到集合末尾。Adds the specified object to the end of the collection.

IList.Clear()

删除集合的内容。Deletes the contents of the collection.

IList.Contains(Object)

返回一个布尔值,指示指定对象是否在集合中。Returns a bool indicating whether the specified object is in the collection.

IList.IndexOf(Object)

返回指定对象在集合中的索引;如果该对象不在集合中,则返回 -1。Returns the index of the specified object in the collection, or -1 if it is not in the collection.

IList.Insert(Int32, Object)

将指定对象插入到集合中的指定位置。Inserts the specified object at the specified position into the collection.

IList.IsFixedSize

获取一个值,该值指示集合大小是否固定。Gets a value indicating whether the collection is fixed-size.

IList.IsReadOnly

获取一个值,该值指示对集合的访问是否为只读。Gets a value indicating whether access to the collection is read-only.

IList.Item[Int32]

获取集合中指定索引处的对象。Gets the object at the specified index in the collection.

IList.Remove(Object)

从集合中移除指定的对象。Removes the specified object from the collection.

IList.RemoveAt(Int32)

从集合的指定索引处删除对象。Removes the object at the specified index from the collection.

扩展方法

CopyToDataTable<T>(IEnumerable<T>)

在给定其泛型参数 TDataTable 的输入 DataRow 对象的情况下,返回包含 IEnumerable<T> 对象副本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

在给定其泛型参数 TDataRow 的输入 DataTable 对象的情况下,将 IEnumerable<T> 对象复制到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

Ancestors<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个节点的上级。Returns a collection of elements that contains the ancestors of every node in the source collection.

Ancestors<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个节点的上级。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

DescendantNodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子代节点的集合。Returns a collection of the descendant nodes of every document and element in the source collection.

Descendants<T>(IEnumerable<T>)

返回元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a collection of elements that contains the descendant elements of every element and document in the source collection.

Descendants<T>(IEnumerable<T>, XName)

返回经过筛选的元素集合,其中包含源集合中每个元素和文档的子代元素。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

Elements<T>(IEnumerable<T>)

返回源集合中每个元素和文档的子元素的集合。Returns a collection of the child elements of every element and document in the source collection.

Elements<T>(IEnumerable<T>, XName)

返回源集合中经过筛选的每个元素和文档的子元素集合。Returns a filtered collection of the child elements of every element and document in the source collection. 集合中仅包括具有匹配 XName 的元素。Only elements that have a matching XName are included in the collection.

InDocumentOrder<T>(IEnumerable<T>)

返回节点集合(其中包含源集合中的所有节点),并按文档顺序排列。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order.

Nodes<T>(IEnumerable<T>)

返回源集合中每个文档和元素的子节点集合。Returns a collection of the child nodes of every document and element in the source collection.

Remove<T>(IEnumerable<T>)

将源集合中的每个节点从其父节点中移除。Removes every node in the source collection from its parent node.

适用于