HttpCookieCollection.CopyTo(Array, Int32) 메서드

정의

지정된 배열 인덱스에서 시작하는 Array에 쿠키 컬렉션 멤버를 복사합니다.

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

매개 변수

dest
Array

대상 Array입니다.

index
Int32

복사를 시작할 대상 배열의 인덱스입니다.

예제

다음 예제에서는 새 배열 개체에 전체 쿠키 컬렉션을 복사합니다.

// Create the one-dimensional target array.
 // Dimension it large enough to hold the cookies collection.
 Array MyArray = Array.CreateInstance( typeof(String), Request.Cookies.Count );

 // Copy the entire collection to the array.
 Request.Cookies.CopyTo( MyArray, 0 );
' Create the one-dimensional target array.
 ' Dimension it large enough to hold the cookies collection.
 Dim MyArray As Array = Array.CreateInstance(GetType(String), Request.Cookies.Count)
 
 ' Copy the entire collection to the array.
 Request.Cookies.CopyTo(MyArray, 0)

적용 대상

추가 정보