Contains

MathParagraph.Contains method

Determines whether the collection contains a specific value.

public bool Contains(IMathBlock mathBlock)
ParameterTypeDescription
mathBlockIMathBlockThe object to locate in the collection.

Return Value

true if mathBlock is found in the collection; otherwise, false.

Examples

Example:

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

See Also