| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- /**
- * Namespace: System.Web.UI.WebControls
- * Class: DataKeyCollection
- *
- * 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 DataKeyCollection : ICollection, IEnumerable
- {
- private ArrayList keys;
- public DataKeyCollection(ArrayList keys)
- {
- this.keys = keys;
- }
- public int Count
- {
- get
- {
- return keys.Count;
- }
- }
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
- public bool IsSynchronized
- {
- get
- {
- return false;
- }
- }
- public object this[int index]
- {
- get
- {
- return keys[index];
- }
- }
- public object SyncRoot
- {
- get
- {
- return this;
- }
- }
- public void CopyTo(Array array, int index)
- {
- foreach(object current in this)
- {
- array.SetValue(current, index++);
- }
- }
- public IEnumerator GetEnumerator()
- {
- return keys.GetEnumerator();
- }
- }
- }
|