SecurityElement.Equal(SecurityElement) Method

Definition

Compares two XML element objects for equality.

public:
 bool Equal(System::Security::SecurityElement ^ other);
public bool Equal (System.Security.SecurityElement other);
public bool Equal (System.Security.SecurityElement? other);
member this.Equal : System.Security.SecurityElement -> bool
Public Function Equal (other As SecurityElement) As Boolean

Parameters

other
SecurityElement

An XML element object to which to compare the current XML element object.

Returns

true if the tag, attribute names and values, child elements, and text fields in the current XML element are identical to their counterparts in the other parameter; otherwise, false.

Examples

The following code shows the use of the Equal method to compare two XML elements. This code example is part of a larger example provided for the SecurityElement class.

if ( xmlElement->Equal( localXmlElement ) )
if (xmlElement.Equal(localXmlElement))
If xmlElement.Equal(localXmlElement) Then

Remarks

If there are child elements, comparison extends recursively to them.

There is no support for comparing different XML representations of the same characters.

Applies to