Item
WarningInfoCollection indexer
获取指定索引处的项目。
public WarningInfo this[int index] { get; }
范围 | 描述 |
---|---|
index | 该项目的从零开始的索引。 |
例子
展示如何获取有关不支持格式的警告。
WarningInfoCollection warnings = new WarningInfoCollection();
Document doc = new Document(MyDir + "FB2 document.fb2", new LoadOptions { WarningCallback = warnings });
Assert.AreEqual("The original file load format is FB2, which is not supported by Aspose.Words. The file is loaded as an XML document.", warnings[0].Description);
Assert.AreEqual(1, warnings.Count);
也可以看看
- class WarningInfo
- class WarningInfoCollection
- 命名空间 Aspose.Words
- 部件 Aspose.Words