Files
mono/mcs/class/System.Web/System.Web.UI.WebControls/DataListItemCollection.cs
T
Gaurav Vaish cea71236b2 2002-03-16 Gaurav Vaish <[email protected]>
* Trying to go for a build... changes due to the same...

svn path=/trunk/mcs/; revision=3139
2002-03-16 00:59:22 +00:00

84 lines
1.2 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.Collections;
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();
}
}
}