TargetCollection TargetCollection TargetCollection TargetCollection Class


表示项目中所有 Target 元素的集合。Represents a collection of all Target elements in a project.

public ref class TargetCollection : System::Collections::ICollection
public class TargetCollection : System.Collections.ICollection
type TargetCollection = class
    interface IEnumerable
    interface ICollection
Public Class TargetCollection
Implements ICollection


Count Count Count Count

获取一个值,该值指示 TargetTargetCollection 对象的数目。Gets a value indicating the number of Target objects in the TargetCollection.

IsSynchronized IsSynchronized IsSynchronized IsSynchronized

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

Item[String] Item[String] Item[String] Item[String]

获取 Target 中的指定 TargetCollection 对象。Gets the specified Target object in the TargetCollection.

SyncRoot SyncRoot SyncRoot SyncRoot

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


AddNewTarget(String) AddNewTarget(String) AddNewTarget(String) AddNewTarget(String)

将新的 Target 元素添加到项目末尾。Adds a new Target element to the end of the project.

CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32) CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 TargetCollection 复制到兼容的一维 ArrayCopies the entire TargetCollection to a compatible one-dimensional Array, starting at the specified index of the target array.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
Exists(String) Exists(String) Exists(String) Exists(String)

确定指定的 Target 是否存在于 TargetCollection 中。Determines whether the specified Target exists in the TargetCollection.

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

获取循环访问 TargetCollection 的枚举器。Gets an enumerator that iterates through the TargetCollection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

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

(Inherited from Object)
GetType() GetType() GetType() GetType()

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

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

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

(Inherited from Object)
RemoveTarget(Target) RemoveTarget(Target) RemoveTarget(Target) RemoveTarget(Target)

从项目中移除指定的 Target 元素。Removes the specified Target element from the project.

ToString() ToString() ToString() ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)


Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

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

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.