Insert

IMathElementCollection.Insert 方法

在指定的索引处将数学元素插入到集合中。

public void Insert(int index, IMathElement item)
参数类型描述
indexInt32插入IMathElement的零基索引。
itemIMathElement要插入的IMathElement。

示例

示例:

[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")));

另请参阅