Files
mono/mcs/class/System.Web/System.Web.UI.WebControls/DataListItemCollection.cs
T
Gaurav Vaish 413ac0dcfe 2002-03-03 Gaurav Vaish <[email protected]>
* *Collection.cs -- Added, completed.

svn path=/trunk/mcs/; revision=2852
2002-03-03 04:36:17 +00:00

84 lines
1.3 KiB
C#

/**
* Namespace: System.Web.UI.WebControls
* Class: DataListItemCollection
*
* Author: Gaurav Vaish
* Maintainer: [email protected]
* Contact: <[email protected]>, <[email protected]>
* Implementation: yes
* Status: 100%
*
* (C) Gaurav Vaish (2002)
*/
using System;
using System.Collection;
using System.Web;
using System.Web.UI;
namespace System.Web.UI.WebControls
{
public sealed class DataListItemCollection : ICollection, IEnumerable
{
private ArrayList items;
public DataListItemCollection(ArrayList items)
{
this.items = items;
}
public int Count
{
get
{
return items.Count;
}
}
public bool IsReadOnly
{
get
{
return false;
}
}
public bool IsSynchronized
{
get
{
return false;
}
}
public DataListItem this[int index]
{
get
{
return (DataListItem)(items[index]);
}
}
public object SyncRoot
{
get
{
return this;
}
}
public void CopyTo(Array array, int index)
{
foreach(DataListItem current in this)
{
array.SetValue(current, index++);
}
}
public IEnumerator GetEnumerator()
{
return items.GetEnumerator();
}
}
}