_XDocument3.Errors プロパティ

定義

フォームに関連付けられている への ErrorsCollection 参照を取得します。

public:
 property Microsoft::Office::Interop::InfoPath::ErrorsCollection ^ Errors { Microsoft::Office::Interop::InfoPath::ErrorsCollection ^ get(); };
public Microsoft.Office.Interop.InfoPath.ErrorsCollection Errors { get; }
member this.Errors : Microsoft.Office.Interop.InfoPath.ErrorsCollection
Public ReadOnly Property Errors As ErrorsCollection

プロパティ値

フォームに関連付けられている への ErrorsCollection 参照。

実装

次の例では、オブジェクトの Errors プロパティを XDocument 使用して、数またはエラーの数を返し、その値をメッセージ ボックスに表示します。

int errors;

errors = thisXDocument.<span class="label">Errors</span>.Count;
thisXDocument.UI.Alert("Total number of errors: " + errors);

次の例では、オブジェクトの Errors プロパティを XDocument 使用して、数またはエラーの数を返し、その値をメッセージ ボックスに表示します。

int errors;

errors = thisXDocument.<span class="label">Errors</span>.Count;
thisXDocument.UI.Alert("Total number of errors: " + errors);

注釈

フォームの基になる XML ドキュメントには Errors コレクションが関連付けられており、エラーが発生するときには XML ドキュメント内で発生します。 Errors コレクションへの参照を設定すると、InfoPath フォームで発生したエラーを管理するためのプロパティおよびメソッドにアクセスできるようになります。

適用対象