HttpStaticObjectsCollection.CopyTo(Array, Int32) 메서드

정의

HttpStaticObjectsCollection의 멤버를 배열에 복사합니다.

public:
 virtual void CopyTo(Array ^ array, int index);
public void CopyTo (Array array, int index);
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)

매개 변수

array
Array

HttpStaticObjectsCollection을 복사할 대상 배열입니다.

index
Int32

복사를 시작할 컬렉션의 멤버입니다.

구현

예제

다음 예제에서는 필요한 크기의 새 Object 배열을 만들고 기존 StaticObjects 컬렉션을 복사합니다.

// Find the number of members in the StaticObjects collection.
int ObjCount = Application.StaticObjects.Count;
// Create an array of the same size.
Object[] MyObjArray = new Object[ObjCount];
// Copy the entire collection into the array.
Application.StaticObjects.CopyTo(MyObjArray, 0);
' Find the number of members in the StaticObjects collection.
Dim ObjCount As Integer = Application.StaticObjects.Count
' Create an array of the same size.
Dim MyObjArray(ObjCount) As Object
' Copy the entire collection into the array.
Application.StaticObjects.CopyTo(MyObjArray, 0)

적용 대상