Click or drag to resize
TextExtensionsRemove Method
Removes a sequence of characters from the range.

Namespace: TextObjectModel
Assembly: ManagedTOM2 (in ManagedTOM2.dll) Version: 1.0.5577.41188
Syntax
public static void Remove(
	this TextRange range,
	int index,
	int count
)

Parameters

range
Type: TextObjectModelTextRange
The range to remove the characters from.
index
Type: SystemInt32
Character position (relative to the start of the range) to begin removing characters.
count
Type: SystemInt32
The number of characters to remove.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TextRange. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionindex does not fall within the bounds of the range, or count is negative, or count is greater-than the number of characters in the range after index.
Remarks
This extension method mimics the behaviour of the Remove(Int32, Int32) method of the StringBuilder class.
See Also