Evidence::Count Property

 
Note: This API is now obsolete.

Gets the number of evidence objects in the evidence set.

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

public:
[ObsoleteAttribute("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
property int Count {
	virtual int get() sealed;
}

Property Value

Type: System::Int32

The number of evidence objects in the evidence set.

The following code example shows the use of the Count property. This example is part of a larger example provided for the Evidence class.

Console::WriteLine( "\nMake a copy of the current evidence." );
Evidence^ evidenceCopy = gcnew Evidence( myEvidence );
Console::WriteLine( "Count of new evidence items = {0}", evidenceCopy->Count );
Console::WriteLine( "Does the copy equal the current evidence? {0}", myEvidence->Equals( evidenceCopy ) );

.NET Framework
Available since 1.1
Return to top
Show: