Remove

MathParagraph.Remove method

Removes the first occurrence of a specific object from the collection/>.

public bool Remove(IMathBlock mathBlock)
ParameterTypeDescription
mathBlockIMathBlockThe object to remove from the collection.

Return Value

true if mathBlock was successfully removed from the collection; otherwise, false. This method also returns false if mathBlock is not found in the original collection/>.

Examples

Example:

[C#]
IAutoShape shape = slide.Shapes.AddMathShape(x, y, width, height);
IMathParagraph mathParagraph = (shape.TextFrame.Paragraphs[0].Portions[0] as MathPortion).MathParagraph;
mathParagraph.Add(new MathBlock(new MathematicalText("x")));
IMathBlock block = new MathBlock(new MathematicalText("y"));
mathParagraph.Add(block);
mathParagraph.Remove(block);

See Also