public abstract System.Data.IDbDataParameter Parameters[int i]
{
            get{}
}

解决方案 »

  1.   

    请看msdn中关于索引器的内容。
      

  2.   

    // cs_keyword_indexers.cs
    using System;
    class IndexerClass 
    {
       private int [] myArray = new int[100]; 
       public int this [int index]   // Indexer declaration
       {
          get 
          {
             // Check the index limits.
             if (index < 0 || index >= 100)
                return 0;
             else
                return myArray[index];
          }
          set 
          {
             if (!(index < 0 || index >= 100))
                myArray[index] = value;
          }
       }
    }public class MainClass 
    {
       public static void Main() 
       {
          IndexerClass b = new IndexerClass();
          // Call the indexer to initialize the elements #3 and #5.
          b[3] = 256;
          b[5] = 1024;
          for (int i=0; i<=10; i++) 
          {
             Console.WriteLine("Element #{0} = {1}", i, b[i]);
          }
       }
    }
      

  3.   

    楼上的 哥哥,没看清楚我的意识吧我不是想对this进行索引而是 System.Data.IDbDataParameter Parameters[int index]怎么实现?
      

  4.   

    public class BorrowRequests:CollectionBase
    {
    public BorrowRequest this[ int index ]  
    {
    get  
    {
    return( (BorrowRequest) List[index] );
    }
    set  
    {
    List[index] = value;
    }
    }

    public int Add( BorrowRequest value )  
    {
    return( List.Add( value ) );
    } public int IndexOf( BorrowRequest value )  
    {
    return( List.IndexOf( value ) );
    } public void Insert( int index, BorrowRequest value )  
    {
    List.Insert( index, value );
    } public void Remove( BorrowRequest value )  
    {
    List.Remove( value );
    }
    public bool Contains( BorrowRequest value )  
    {
    return( List.Contains( value ));
    } public BorrowRequests()
    {
    //
    // TODO: 在此处添加构造函数逻辑
    //
    }
      

  5.   

    public DbParameterCollection Parameter
    {
      get{ ... }
    }然后再自己写个ParameterCollection类
    实现:
    IDbParameterCollection this [int index]
    {
      get
    }