GetEnumerator Method

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)

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

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 (null == myEvidence) return 0;
IEnumerator list = myEvidence.GetEnumerator();
while (list.MoveNext())
{
    Console.WriteLine(list.Current.ToString());
}

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