ArrayEditor 类

提供用于在设计时编辑数组的用户界面。

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

语法

声明
Public Class ArrayEditor
    Inherits CollectionEditor
用法
Dim instance As ArrayEditor
public class ArrayEditor : CollectionEditor
public ref class ArrayEditor : public CollectionEditor
public class ArrayEditor extends CollectionEditor
public class ArrayEditor extends CollectionEditor

备注

此编辑器可用于在设计时环境中编辑数组。

示例

下面的代码示例演示了如何对一个属性应用 System.ComponentModel.EditorAttribute

<EditorAttribute(GetType(ArrayEditor), GetType(System.Drawing.Design.UITypeEditor))> _
Public Property componentArray() As Object()
    Get
        Return compArray
    End Get
    Set(ByVal Value As Object())
        compArray = Value
    End Set
End Property
Private compArray() As Object
[EditorAttribute(typeof(System.ComponentModel.Design.ArrayEditor), typeof(System.Drawing.Design.UITypeEditor))]
public object[] componentArray
{
    get
    {
        return compArray;
    }
    set
    {
        compArray = value;
    }
}
private object[] compArray;
public:
   property array<Object^>^ componentArray 
   {
      [EditorAttribute(System::ComponentModel::Design::ArrayEditor::typeid,
         System::Drawing::Design::UITypeEditor::typeid)]
      array<Object^>^ get()
      {
         return compArray;
      }
      void set( array<Object^>^ value )
      {
         compArray = value;
      }
   }
private:
   array<Object^>^compArray;
/** @attribute EditorAttribute(System.ComponentModel.Design.ArrayEditor.
    class,System.Drawing.Design.UITypeEditor.class)
 */
/** @property 
 */
public Object[] get_componentArray()
{
    return compArray;
}//get_componentArray

/** @property
 */
public void set_componentArray(Object value[])
{
    compArray = value;
}//set_componentArray

private Object compArray[];

继承层次结构

System.Object
   System.Drawing.Design.UITypeEditor
     System.ComponentModel.Design.CollectionEditor
      System.ComponentModel.Design.ArrayEditor

线程安全

此类型的任何公共静态(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

请参见

参考

ArrayEditor 成员
System.ComponentModel.Design 命名空间
CollectionEditor