/**\r
* Namespace: System.Web.UI.WebControls\r
* Class: DataKeyCollection\r
- * \r
+ *\r
* Author: Gaurav Vaish\r
* Maintainer: gvaish@iitk.ac.in\r
* Contact: <my_scripts2001@yahoo.com>, <gvaish@iitk.ac.in>\r
* Implementation: yes\r
* Status: 100%\r
- * \r
+ *\r
* (C) Gaurav Vaish (2002)\r
*/\r
\r
using System;\r
+using System.Collections;\r
using System.Web;\r
using System.Web.UI;\r
\r
public sealed class DataKeyCollection : ICollection, IEnumerable\r
{\r
private ArrayList keys;\r
- \r
+\r
public DataKeyCollection(ArrayList keys)\r
{\r
this.keys = keys;\r
}\r
- \r
+\r
public int Count\r
{\r
get\r
return keys.Count;\r
}\r
}\r
- \r
+\r
public bool IsReadOnly\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
public bool IsSynchronized\r
{\r
get\r
return false;\r
}\r
}\r
- \r
+\r
public object this[int index]\r
{\r
get\r
return keys[index];\r
}\r
}\r
- \r
+\r
public object SyncRoot\r
{\r
get\r
return this;\r
}\r
}\r
- \r
+\r
public void CopyTo(Array array, int index)\r
{\r
foreach(object current in this)\r
array.SetValue(current, index++);\r
}\r
}\r
- \r
+\r
public IEnumerator GetEnumerator()\r
{\r
return keys.GetEnumerator();\r