次の方法で共有


Errors.Item プロパティ

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

名前空間: Microsoft.Office.Interop.InfoPath
アセンブリ: Microsoft.Office.Interop.InfoPath (microsoft.office.interop.infopath.dll 内)

構文

'宣言
<DispIdAttribute(0)> _
ReadOnly Default Property Item ( _
    <InAttribute> index As Integer _
) As ErrorObject
'使用
Dim instance As Errors
Dim index As Integer
Dim value As ErrorObject

value = instance(index)
[DispIdAttribute(0)] 
ErrorObject this [
    [InAttribute] int index
] { get; }

パラメータ

  • index
    ErrorsCollection コレクションのメンバの位置を指定する式です。この引数の最小値は 0 であり、最大値は Count プロパティの値から 1 を引いた値です。

コメント

index 引数に指定した値がコレクションのどの既存のメンバとも一致しない場合は、エラーが発生します。

Item メソッドが返す Error オブジェクトへの参照を設定すると、そのオブジェクトのすべてのプロパティおよびメソッドにアクセスできます。

Item プロパティは ErrorsCollection コレクションの既定のプロパティであるため、次のように使用できます。

Error nextError = thisXDocument.Errors[i];

関連項目

参照

Errors インターフェイス
Errors のメンバ
Microsoft.Office.Interop.InfoPath 名前空間