Difference Class

Definition

Represents a single difference in the set of differences of two lists of elements.

public ref class Difference
[Windows::Foundation::Metadata::WebHostHidden]
class Difference
public class Difference
type Difference = class
Public Class Difference
Inheritance
Difference

Remarks

Each difference consists of a left span and a right span, either of which may have zero length (that is, the operation may be an add operation or a delete operation). The text before and after the difference matches. In general, differencess are non-null. However, when the difference appears at the beginning of the lists of differences, the "before" is null, and when the difference appears at the end of the lists, the "after" is null.

Constructors

Difference(Span, Span, Match, Match)

Initializes a new instance of a Difference with the specified left and right spans and before and after matches.

Properties

After

The mtch after this difference. It is null at the end of the sequence.

Before

The match before this section. It is null at the beginning of the sequence.

DifferenceType

The type of the difference (Add, Remove, or Change).

Left

The left side of the difference (may be zero length).

Right

The right side of the difference (may be zero length).

Methods

Equals(Object)

Determines whether two Difference objects are the same (have the same difference type and the same before and after matches).

GetHashCode()

Serves as a hash code for this type.

ToString()

The string representation of this difference.

Applies to