Udostępnij za pośrednictwem


Evidence.Count Właściwość

Definicja

Przestroga

Evidence should not be treated as an ICollection. Use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.

Przestroga

Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.

Przestroga

Ten interfejs API jest już przestarzały.

Pobiera liczbę obiektów dowodowych w zestawie dowodów.

public:
 property int Count { int get(); };
[System.Obsolete("Evidence should not be treated as an ICollection. Use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
public int Count { get; }
public int Count { get; }
[System.Obsolete("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
public int Count { get; }
[System.Obsolete]
public int Count { get; }
[<System.Obsolete("Evidence should not be treated as an ICollection. Use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")>]
member this.Count : int
member this.Count : int
[<System.Obsolete("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")>]
member this.Count : int
[<System.Obsolete>]
member this.Count : int
Public ReadOnly Property Count As Integer

Wartość właściwości

Liczba obiektów dowodowych w zestawie dowodów.

Implementuje

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia użycie Count właściwości. Ten przykład jest częścią większego przykładu udostępnionego Evidence dla klasy.

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 ) );
Console.WriteLine("\nMake a copy of the current evidence.");
Evidence evidenceCopy = new Evidence(myEvidence);
Console.WriteLine("Count of new evidence items = " + evidenceCopy.Count);
Console.WriteLine("Does the copy equal the current evidence? " + myEvidence.Equals(evidenceCopy));
Console.WriteLine(ControlChars.Lf & "Make a copy of the current evidence.")
Dim evidenceCopy As New Evidence(myEvidence)
Console.WriteLine(("Count of new evidence items = " & evidenceCopy.Count.ToString()))
Console.WriteLine(("Does the copy equal the current evidence? " & myEvidence.Equals(evidenceCopy)))

Dotyczy