次の方法で共有


ErrorsCollection インターフェイス

定義

ErrorObject Microsoft InfoPath フォーム内の各エラーのオブジェクトを格納します。

public interface class ErrorsCollection : Microsoft::Office::Interop::InfoPath::Errors
[System.Runtime.InteropServices.Guid("096CD578-0786-11D1-95FA-0080C78EE3BB")]
public interface ErrorsCollection : Microsoft.Office.Interop.InfoPath.Errors
type ErrorsCollection = interface
    interface Errors
Public Interface ErrorsCollection
Implements Errors
派生
属性
実装

//Add an error to the node
IXMLDOMDocument myDOM = thisXDocument.DOM;
IXMLDOMNode myNode = myDOM.selectSingleNode("my:myFields/my:aGroup/my:field1");
thisXDocument.<span class="label">Errors</span>.Add(myNode,"condition","short","detail",102057,"modeless");
  <p>The <strong>Errors</strong> collection is accessed through the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath._XDocument2.Errors"></xref> property of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.XDocument"></xref> object.</p>
  <code>&lt;span class="label"&gt;ErrorsCollection&lt;/span&gt; err = thisXDocument.Errors;</code>

注釈

この型は、COM の相互運用性を得るためにマネージ コードが必要とするコクラスのラッパーです。 このインターフェイスによって指定されたメンバにアクセスするには、このインターフェイスを実装するコクラスをラップする型を使用します。 使用法、備考、例など、その種類の詳細については、「」を参照してくださいErrors

Errors コレクションには、Error オブジェクトに対して追加、削除、およびアクセスの操作を実行するためのプロパティおよびメソッドがあります。

InfoPath によって生成されるエラーを管理するだけでなく、 Errors コレクションを使用して、 メソッドを使用してカスタム エラーを Add(Object, String, String, String, Int32, String) 作成することもできます。

: カスタム エラーは、 オブジェクトの DataDOMEventObject メソッドをReportError(Object, String, Boolean, String, Int32, String)使用して作成することもできます。

プロパティ

Count

コレクションに含まれるオブジェクトの ErrorObject 数を取得します。

(継承元 Errors)
Item[Int32]

コレクションから指定した ErrorObject オブジェクトへの参照を取得します。

(継承元 Errors)

メソッド

Add(Object, String, String, String, Int32, String)

ErrorObjectを にErrorsCollection追加し、新しい Error オブジェクトへの参照を返します。

(継承元 Errors)
Delete(Object, String)

指定したオブジェクトをコレクションからErrorsCollection削除しますErrorObject

(継承元 Errors)
DeleteAll()

コレクションに含まれるすべての ErrorObject オブジェクトを ErrorsCollection 削除します。

(継承元 Errors)
GetEnumerator()

オブジェクト内のすべてのエントリを反復処理する IEnumeratorErrorsCollection 取得します。

(継承元 Errors)

適用対象