如题:Iesi.Collections.ISet怎样取数?
实现好像是Iesi.Collections.HashedSet,现在想枚举取数。
while(set.GetEnumerator().MoveNext())
{
   (object)set.GetEnumerator().Current;
}
报错:枚举或者尚未开始或者已经结束。请大侠帮忙,谢谢。

解决方案 »

  1.   

    IEnumerator e=set.GetEnumerator();
    while(e.MoveNext()) 

      Object o=e.Current; 
    }
    试试这样呢。 
      

  2.   

    ValidatorCollection myCollection = Page.Validators;   
    IEnumerator myEnumerator = myCollection.GetEnumerator();     
    string myStr = " ";   
    while ( myEnumerator.MoveNext() )   
    {   
       myStr += myEnumerator.Current.ToString();   
       myStr += " ";   
    }