Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes a single contiguous text change operation on the text buffer.
Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)
Syntax
'Declaration
Public Interface ITextChange
public interface ITextChange
public interface class ITextChange
type ITextChange =  interface end
public interface ITextChange
The ITextChange type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| .gif) | Delta | Gets the difference in the length of the buffer that results from this change. | 
| .gif) | LineCountDelta | Gets the difference in the number of lines in the snapshot that results from this change. | 
| .gif) | NewEnd | Gets the end position of the NewText in the snapshot immediately after the text change. | 
| .gif) | NewLength | Gets the length of NewText. | 
| .gif) | NewPosition | Gets the position of the text change in the snapshot immediately after the change. | 
| .gif) | NewSpan | Gets the span of the ITextChange in the snapshot immediately after the change. | 
| .gif) | NewText | Gets the text that replaced the old text. | 
| .gif) | OldEnd | Gets the end position of the OldText in the snapshot immediately before the change. | 
| .gif) | OldLength | Gets the length of OldText. | 
| .gif) | OldPosition | Gets the position of the text change in the snapshot immediately before the change. | 
| .gif) | OldSpan | The span of the text change in the snapshot immediately before the change. | 
| .gif) | OldText | Gets the text that was replaced. | 
Top
Remarks
All text changes are considered to be the replacement of oldText with newText. Insertion is a text change in which oldText is an empty string and newText a non-empty string. Deletion is a text change in which oldText is a non-empty string and newText is an empty string. Modification is a text change in which both oldText and newText are non-empty strings.
ITextChange objects are immutable.