Insert

MathBlock.Insert method

Inserts a MathElement into the collection at the specified index.

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

Examples

Example:

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

See Also