Insert

MathBlock.Insert 方法

在指定索引处将 MathElement 插入集合。

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

示例

示例:

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

另请参阅