DesignerCollection 类

表示设计器的集合。

**命名空间:**System.ComponentModel.Design
**程序集:**System(在 system.dll 中)

语法

声明
Public Class DesignerCollection
    Implements ICollection, IEnumerable
用法
Dim instance As DesignerCollection
public class DesignerCollection : ICollection, IEnumerable
public ref class DesignerCollection : ICollection, IEnumerable
public class DesignerCollection implements ICollection, IEnumerable
public class DesignerCollection implements ICollection, IEnumerable

备注

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

提示

应用于此类的 HostProtectionAttribute 属性 (Attribute) 具有以下 Resources 属性 (Property) 值:SharedStateHostProtectionAttribute 不影响桌面应用程序(桌面应用程序一般通过双击图标,键入命令或在浏览器中输入 URL 启动)。有关更多信息,请参见 HostProtectionAttribute 类或 SQL Server 编程和宿主保护属性

示例

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

' 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})
// 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 array.
array<IDesignerHost^>^temp0 = {designerhost1,designerhost2};
DesignerCollection^ collection = gcnew DesignerCollection( temp0 );

.NET Framework 安全性

继承层次结构

System.Object
  System.ComponentModel.Design.DesignerCollection

线程安全

此类型的任何公共静态(Visual Basic 中的 Shared)成员都是线程安全的,但不保证所有实例成员都是线程安全的。

平台

Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

DesignerCollection 成员
System.ComponentModel.Design 命名空间