Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Evidence::GetEnumerator Method ()

 
Note: This API is now obsolete.

Enumerates all evidence in the set, both that provided by the host and that provided by the assembly.

Namespace:   System.Security.Policy
Assembly:  mscorlib (in mscorlib.dll)

public:
[ObsoleteAttribute("GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.")]
virtual IEnumerator^ GetEnumerator() sealed

Return Value

Type: System.Collections::IEnumerator^

An enumerator for evidence added by both the AddHost method and the AddAssembly method.

The following code example shows the use of the GetEnumerator method. 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++;
}

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft