Insert

IMathElementCollection.Insert method

Inserts a math element into the collection at the specified index.

public void Insert(int index, IMathElement item)
ParameterTypeDescription
indexInt32The zero-based index at which IMathElement should be inserted.
itemIMathElementThe IMathElement to insert.

Examples

Example:

[C#]
IMathElementCollection collection = new MathBlock(new MathematicalText("x"));
MathematicalText plusElement = new MathematicalText("+");
collection.Add(plusElement);
collection.Insert(0, new MathRadical(new MathematicalText("x"), new MathematicalText("3")));

See Also