F
Fernando Rodríguez
Hi,
I have a class called UrlFetcher and keep several instances inside an
ArrayList. This class has a fecth() method.
When I iterate through the list calling the fetch() method, I have to downcast
from object to UrlFetch. This is pretty ugly...
--------------------------------------------------------------
IEnumerator fetcher = fetchers.GetEnumerator();
UrlFetcher f;
while( fetcher.MoveNext() )
{
f = (UrlFetcher)fetcher.Current;
f.fetch();
}
I have a class called UrlFetcher and keep several instances inside an
ArrayList. This class has a fecth() method.
When I iterate through the list calling the fetch() method, I have to downcast
from object to UrlFetch. This is pretty ugly...
--------------------------------------------------------------
IEnumerator fetcher = fetchers.GetEnumerator();
UrlFetcher f;
while( fetcher.MoveNext() )
{
f = (UrlFetcher)fetcher.Current;
f.fetch();
}