Evidence.GetHostEnumerator Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enumerates evidence supplied by the host.
public:
System::Collections::IEnumerator ^ GetHostEnumerator();
public System.Collections.IEnumerator GetHostEnumerator ();
member this.GetHostEnumerator : unit -> System.Collections.IEnumerator
Public Function GetHostEnumerator () As IEnumerator
Returns
An enumerator for evidence added by the AddHost(Object) method.
Examples
The following example shows the use of the GetHostEnumerator method. This example is part of a larger example provided for the Evidence class.
Url^ url = gcnew Url( "http://www.treyresearch.com" );
Console::WriteLine( "Adding host evidence {0}", url );
ev2a->AddHost( url );
Evidence^ ev2b = gcnew Evidence( ev2a );
Console::WriteLine( "Copy evidence into new evidence" );
IEnumerator^ enum1 = ev2b->GetHostEnumerator();
enum1->MoveNext();
Console::WriteLine( enum1->Current );
Url url = new Url("http://www.treyresearch.com");
Console.WriteLine("Adding host evidence " + url.ToString());
ev2a.AddHost(url);
Evidence ev2b = new Evidence(ev2a);
Console.WriteLine("Copy evidence into new evidence");
IEnumerator enum1 = ev2b.GetHostEnumerator();
enum1.MoveNext();
Console.WriteLine(enum1.Current.ToString());
Dim url As New Url("http://www.treyresearch.com")
Console.WriteLine(("Adding host evidence " & url.ToString()))
ev2a.AddHost(url)
Dim ev2b As New Evidence(ev2a)
Console.WriteLine("Copy evidence into new evidence")
Dim enum1 As IEnumerator = ev2b.GetHostEnumerator()
enum1.MoveNext()
Console.WriteLine(enum1.Current.ToString())
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.