SecurityElement.Equal Method (SecurityElement)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Compares two XML element objects for equality.

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

public bool Equal(
	SecurityElement other
)

Parameters

other
Type: System.Security.SecurityElement

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

Return Value

Type: System.Boolean

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.

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

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

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))

.NET Framework
Available since 1.1
Return to top
Show: