C# also contains the Enumaration class.Please check out the below code.
using System;
using System.Collections;
public virtual string extractSelectAllValue(Hashtable pDataTable)
{
System.Collections.IEnumerator lKeyEnumeration;
string lKeyValue;
string lDataValue;
lKeyValue = "";
lDataValue = "";
try
{
lKeyEnumeration = pDataTable.Keys.GetEnumerator();
while (lKeyEnumeration.hasMoreElements())
{
lKeyValue = (string)lKeyEnumeration.nextElement();
lDataValue = lDataValue + (string)pDataTable[lKeyValue] + "::";
}
return lDataValue;
}
catch(Exception ex)
{
throw ex;
}