Item

MathParagraph indexer

获取指定索引处的项目。 只读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];

也可以看看