DataGridViewColumnCollection.IList.Add(Object) 方法

定义

将对象添加到集合的末尾。

 virtual int System.Collections.IList.Add(System::Object ^ value) = System::Collections::IList::Add;
int IList.Add (object value);
abstract member System.Collections.IList.Add : obj -> int
override this.System.Collections.IList.Add : obj -> int
Function Add (value As Object) As Integer Implements IList.Add

参数

value
Object

要添加到集合末尾的 Object。 该值可以为 null

返回

Int32

已添加了 value 的位置处的索引。

实现

例外

valuenull

关联的 DataGridView 控件正在执行以下操作之一,该操作暂时禁止添加新列:

注解

此成员是显式接口成员的实现。 它只能在 DataGridViewColumnCollection 实例被强制转换为 IList 接口时使用。

适用于

另请参阅