Evidence.GetEnumerator メソッド

定義

注意事項

GetEnumerator is obsolete. Use GetAssemblyEnumerator and GetHostEnumerator instead.

注意事項

GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.

注意事項

この API は非推奨になりました。

ホストが提供する証拠とアセンブリが提供する証拠の両方を含め、証拠セット内のすべての証拠を列挙します。

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

戻り値

AddHost(Object) メソッドと AddAssembly(Object) メソッドの両方によって追加された証拠に対する列挙子。

実装

属性

次のコード例は、 メソッドの使用方法を GetEnumerator 示しています。 この例は、 クラスに対して提供されるより大きな例の Evidence 一部です。

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

適用対象