Difference Class

 

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

Namespace:   Microsoft.VisualStudio.Text.Differencing
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

System.Object
  Microsoft.VisualStudio.Text.Differencing.Difference

public class Difference

NameDescription
System_CAPS_pubmethodDifference(Span, Span, Match, Match)

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

NameDescription
System_CAPS_pubpropertyAfter

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

System_CAPS_pubpropertyBefore

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

System_CAPS_pubpropertyDifferenceType

The type of the difference (add, remove, or change).

System_CAPS_pubpropertyLeft

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

System_CAPS_pubpropertyRight

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

NameDescription
System_CAPS_pubmethodEquals(Object)

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

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as a hash code for this type.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

The string representation of this difference.(Overrides Object.ToString().)

Each difference consists of a left span and a right span, either of which may have zero length (if the operation is an add operation or a delete operation). The text before and after the difference matches.

In general, differences 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: