Item

MathParagraph 索引器

获取指定索引处的项。只读 IMathBlock

public IMathBlock this[int index] { get; set; }
参数描述
index要获取的项的零基索引

返回值

一个数学文本块。

示例

示例:

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

另请参见