Evidence.GetEnumerator Evidence.GetEnumerator Evidence.GetEnumerator Evidence.GetEnumerator Method

定義

警告

この API は現在使われていません。

ホストが提供する証拠とアセンブリが提供する証拠の両方を含め、証拠セット内のすべての証拠を列挙します。Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.

public:
 virtual System::Collections::IEnumerator ^ GetEnumerator();
[System.Obsolete]
[System.Obsolete("GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.")]
public System.Collections.IEnumerator GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.IEnumerator
override this.GetEnumerator : unit -> System.Collections.IEnumerator
Public Function GetEnumerator () As IEnumerator

戻り値

AddHost(Object) メソッドと AddAssembly(Object) メソッドの両方によって追加された証拠に対する列挙子。An enumerator for evidence added by both the AddHost(Object) method and the AddAssembly(Object) method.

実装

次のコード例の使用を示しています、GetEnumeratorメソッド。The following code example shows the use of the GetEnumerator method. この例が示されている例の一部、Evidenceクラス。This example is part of a larger example provided for the Evidence class.

int p = 0;
Console::WriteLine( "\nCurrent evidence = " );
if ( nullptr == myEvidence )
      return 0;

IEnumerator^ list = myEvidence->GetEnumerator();
IEnumerator^ myEnum1 = list;
while ( myEnum1->MoveNext() )
{
   Object^ obj = safe_cast<Object^>(myEnum1->Current);
   Console::WriteLine( obj );
   p++;
}
int p = 0;
Console.WriteLine("\nCurrent evidence = ");
if (null == myEvidence) return 0;
IEnumerator list = myEvidence.GetEnumerator();
while (list.MoveNext())
{
    Console.WriteLine(list.Current.ToString());
}
Dim p As Integer = 0
Console.WriteLine(ControlChars.Lf & "Current evidence = ")
If myEvidence Is Nothing Then
    Return 0
End If
Dim list As IEnumerator = myEvidence.GetEnumerator()
Dim obj As Object
While list.MoveNext()
    Console.WriteLine(list.Current.ToString())
    p = p + 1
End While

適用対象