[stringtemplate-interest] Problem with
IEnumeratorcollections(c#2.3b7 )
Kunle Odutola
Kunle_Odutola at hotmail.com
Fri Jun 2 17:47:27 PDT 2006
Hi,
Just correcting a few brainfarts:
// the following code would result in no change of the Enumerator
try
{
((IEnumerator)a).current ;
// We must have a members in the list
return true ;
}
catch ( InvalidOperationException e )
{
// We are at start of list (or lumbered with an invalid enumerator)
try
{
if ( ((IEnumerator)a).MoveNext() )
{
// put it back to start of list
((IEnumerator)a).Reset() ;
return true;
}
catch (InvalidOperationException)
{
// lumbered with a dead duck
}
}
Kunle
More information about the stringtemplate-interest
mailing list