Aspose::Words::WarningInfoCollection::idx_get метод
WarningInfoCollection::idx_get method
Получает элемент по указанному индексу.
System::SharedPtr<Aspose::Words::WarningInfo> Aspose::Words::WarningInfoCollection::idx_get(int32_t index)
| Параметр | Тип | Описание |
|---|---|---|
| index | int32_t | Нулевой индекс элемента. |
Примеры
Показывает, как получать предупреждения о неподдерживаемых форматах.
auto warnings = System::MakeObject<Aspose::Words::WarningInfoCollection>();
auto loadOptions = System::MakeObject<Aspose::Words::Loading::LoadOptions>();
loadOptions->set_WarningCallback(warnings);
auto doc = System::MakeObject<Aspose::Words::Document>(get_MyDir() + u"FB2 document.fb2", loadOptions);
ASSERT_EQ(u"The original file load format is FB2, which is not supported by Aspose.Words. The file is loaded as an XML document.", warnings->idx_get(0)->get_Description());
ASSERT_EQ(1, warnings->get_Count());
См. также
- Class WarningInfo
- Class WarningInfoCollection
- Namespace Aspose::Words
- Library Aspose.Words for C++