DesignerCollection 类

定义

表示设计器的集合。

public ref class DesignerCollection : System::Collections::ICollection
public class DesignerCollection : System.Collections.ICollection
type DesignerCollection = class
    interface ICollection
    interface IEnumerable
Public Class DesignerCollection
Implements ICollection
继承
DesignerCollection
实现

示例

下面的代码示例创建 DesignerCollection 使用指定对象数组初始化的对象 IDesignerHost

// Create a DesignerCollection using a constructor
// that accepts an array of IDesignerHost objects with 
// which to initialize the array.
array<IDesignerHost^>^temp0 = {designerhost1,designerhost2};
DesignerCollection^ collection = gcnew DesignerCollection( temp0 );
// Create a DesignerCollection using a constructor
// that accepts an array of IDesignerHost objects with 
// which to initialize the array.
DesignerCollection collection = new DesignerCollection( 
    new IDesignerHost[] { designerhost1, designerhost2 } );
' Create a DesignerCollection using a constructor
' that accepts an array of IDesignerHost objects with
' which to initialize the collection.
Dim collection As New DesignerCollection(New IDesignerHost() {designerhost1, designerhost2})

注解

此集合对象可以存储对一组设计器的引用。

构造函数

DesignerCollection(IDesignerHost[])

初始化包含指定设计器的 DesignerCollection 类的新实例。

DesignerCollection(IList)

初始化包含指定设计器集的 DesignerCollection 类的新实例。

属性

Count

获取集合中的设计器数。

Item[Int32]

获取指定索引处的设计器。

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetEnumerator()

获取此集合的新枚举数。

GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

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

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

将该集合的元素复制到 Array(从特定的 Array 索引开始)。

ICollection.Count

获取集合中包含的元素数。

ICollection.IsSynchronized

获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。

ICollection.SyncRoot

获取可用于同步对集合的访问的对象。

IEnumerable.GetEnumerator()

获取此集合的新枚举数。

扩展方法

Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

适用于