指定されたインデックス位置のオブジェクトを取得します。C# では、このプロパティは DataSourceRef
クラスのインデクサです。
名前空間 CrystalDecisions.Web アセンブリ CrystalDecisions.Web (CrystalDecisions.Web.dll)
構文
'宣言
Public Overrideable Property Item ( _
ByVal index As Integer _
) As CrystalDecisions.Web.DataSourceRef
public virtual CrystalDecisions.Web.DataSourceRef this [
int index
]{get; set;}
パラメータ
- index
プロパティ値
コレクション内の指定されたインデックス位置の値。
解説
このプロパティにより、コレクション内の特定のアイテムにアクセスできます。0 から始まる数値のインデックスを使用してアイテムを参照します。
Item というプロパティ名は、C# には存在しません。C# でコレクションのアイテムにアクセスするには、collection[0]
という構文を使用します。
例
次の例は、DataSources
オブジェクトから DataSourceRef
オブジェクトを取得する方法を示します。
'宣言
Private Function GetDataSourceRef(ByVal myDataSources As DataSources, ByVal myIndex As Integer) _
As DataSourceRef
GetDataSourceRef = myDataSources.Item(myIndex)
End Function
private DataSourceRef GetDataSourceRef(DataSources dataSources, int index)
{
return dataSources[index];
}
バージョン情報
Crystal Reports Basic for Visual Studio 2008
サポートの開始: Crystal Reports for Visual Studio 2005