다음을 통해 공유


Evidence.CopyTo(Array, Int32) 메서드

정의

주의

Evidence should not be treated as an ICollection. Use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.

주의

Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.

주의

이 API는 이제 사용되지 않습니다.

증명 정보 개체를 Array에 복사합니다.

public:
 virtual void CopyTo(Array ^ array, int index);
[System.Obsolete("Evidence should not be treated as an ICollection. Use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
public void CopyTo (Array array, int index);
public void CopyTo (Array array, int index);
[System.Obsolete("Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
public void CopyTo (Array array, int index);
[System.Obsolete]
public void CopyTo (Array array, int index);
[<System.Obsolete("Evidence should not be treated as an ICollection. Use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")>]
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
[<System.Obsolete("Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")>]
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
[<System.Obsolete>]
abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit
Public Sub CopyTo (array As Array, index As Integer)

매개 변수

array
Array

증명 정보 개체를 복사할 대상 배열입니다.

index
Int32

배열에서 0부터 시작하는 위치로 증명 정보 개체의 복사가 시작되는 위치입니다.

구현

특성

예외

array가 null입니다.

index가 대상 배열의 범위를 벗어납니다.

예제

다음 코드 예제에서는 사용 된 메서드입니다 CopyTo . 이 예제는에 대해 제공 된 큰 예제의 일부는 Evidence 클래스입니다.

Console::WriteLine( "\nCopy the evidence to an array using CopyTo, then display the array." );
array<Object^>^evidenceArray = gcnew array<Object^>(myEvidence->Count);
myEvidence->CopyTo( evidenceArray, 0 );
for each (Object^ obj in evidenceArray)
{
   Console::WriteLine(obj->ToString());
}
Console.WriteLine("\nCopy the evidence to an array using CopyTo, then display the array.");
object[] evidenceArray = new object[myEvidence.Count];
myEvidence.CopyTo(evidenceArray, 0);
foreach (object obj in evidenceArray)
{
    Console.WriteLine(obj.ToString());
}
Console.WriteLine(ControlChars.Lf & "Copy the evidence to an array using CopyTo, then display the array.")
Dim evidenceArray(myEvidence.Count - 1) As Object
myEvidence.CopyTo(evidenceArray, 0)
Dim obj As Object
For Each obj In evidenceArray
    Console.WriteLine(obj.ToString())
Next obj

적용 대상