GraphLinkCollection.CopyTo 方法

从特定的 System.Array 索引开始,将 System.Collections.Generic.ICollection 的元素复制到 System.Array。

命名空间:  Microsoft.VisualStudio.GraphModel
程序集:  Microsoft.VisualStudio.GraphModel(在 Microsoft.VisualStudio.GraphModel.dll 中)

语法

声明
Public Sub CopyTo ( _
    array As GraphLink(), _
    arrayIndex As Integer _
)
public void CopyTo(
    GraphLink[] array,
    int arrayIndex
)
public:
virtual void CopyTo(
    array<GraphLink^>^ array, 
    int arrayIndex
) sealed
abstract CopyTo : 
        array:GraphLink[] * 
        arrayIndex:int -> unit  
override CopyTo : 
        array:GraphLink[] * 
        arrayIndex:int -> unit
public final function CopyTo(
    array : GraphLink[], 
    arrayIndex : int
)

参数

  • array
    类型:array<Microsoft.VisualStudio.GraphModel.GraphLink[]

    一维 System.Array,是从 System.Collections.Generic.ICollection 中复制的元素的目标。 该系统数组必须具有从零开始的索引。

  • arrayIndex
    类型:Int32

    数组中从零开始的索引,在此处开始复制。

实现

ICollection.CopyTo(UTP, Int32)

异常

异常 条件
ArgumentNullException

数组为空。

ArgumentOutOfRangeException

arrayIndex 小于 0。

ArgumentException

数组是多维的。或者源系统中元素的数量。Collections.Generic.ICollection 大于从 arrayIndex 到目标数组末尾的可用空间。或无法自动将类型 T 强制转换为目标数组的类型。

.NET Framework 安全性

请参阅

参考

GraphLinkCollection 类

Microsoft.VisualStudio.GraphModel 命名空间