次の方法で共有


XmlFormCollection.Item プロパティ

インデックス値で指定されたコレクション内の XmlForm オブジェクトへの参照を取得します。

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

構文

'宣言
Public MustOverride ReadOnly Default Property Item ( _
    index As Integer _
) As XmlForm
'使用
Dim instance As XmlFormCollection
Dim index As Integer
Dim value As XmlForm

value = instance(index)
public abstract XmlForm this [
    int index
] { get; }

パラメータ

  • index
    返されるフォームのゼロベースのインデックス。

プロパティ値

指定したインデックス値の XmlForm オブジェクト。

例外処理

例外の種類 条件

IndexOutOfRangeException

指定したインテックスは範囲外です。

コメント

index パラメータに指定した値がコレクションのどのメンバとも一致しない場合は、例外が発生します。

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

このメンバは制限なしでアクセスできます。

この型またはメンバは、Microsoft Office InfoPath 2007 で開いているフォームで実行されているコードからのみアクセスできます。

Item プロパティは XmlFormCollection クラスの既定のプロパティなので、次の例に示すように使用できます。

XmlForm firstForm = this.Application.XmlForms[0];
Dim firstForm As XmlForm  = Me.Application.XmlForms(0)

関連項目

参照

XmlFormCollection クラス
XmlFormCollection のメンバ
Microsoft.Office.InfoPath 名前空間