Wikis > C# Wiki > Collection

public class XMLQueryCollectionItem
{

   // Variables
   public string return_Query = "";
   public string return_TableName = "";

   // Constructor
   public XMLQueryCollectionItem(string _Query,
                                 string _TableName)
   {
      return_Query = _Query;
      return_TableName = _TableName;
   }

}

public class XMLQueryCollection : System.Collections.CollectionBase
{

   public void Add(XMLQueryCollectionItem _Item)
   { this.List.Add(_Item); }

   public void Add(string _Query,
                   string _TableName)
   { this.List.Add(new XMLQueryCollectionItem(_Query, _TableName)); }

   public void Remove(XMLQueryCollectionItem _item)
   { this.List.Remove(local_item); }

   public bool Contains(XMLQueryCollectionItem _item)
   { return this.List.Contains(_item); }

   public int IndexOf(XMLQueryCollectionItem _item)
   { return this.List.IndexOf(_item); }

   public void CopyTo(XMLQueryCollectionItem[] _array, int _index)
   { this.List.CopyTo(_array, _index); }

   public XMLQueryCollectionItem this[int _index]
   {
      get { return (XMLQueryCollectionItem)this.List[_index]; }
      set { this.List[_index] = value; }
   }

}

MSDN Artikel

Category: Tags: