Επεξεργασία

Κοινή χρήση μέσω


Evidence.Equals(Object) Method

Definition

Determines whether the specified Evidence object is equal to the current Evidence.

public:
 override bool Equals(System::Object ^ obj);
[System.Runtime.InteropServices.ComVisible(false)]
public override bool Equals (object obj);
[<System.Runtime.InteropServices.ComVisible(false)>]
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

Parameters

obj
Object

The Evidence object to compare with the current Evidence.

Returns

true if the specified Evidence object is equal to the current Evidence; otherwise, false.

Attributes

Examples

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

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)))
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( "\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 ) );

Remarks

For more information, see Equals.

Applies to