'WithEvents' Variables cannot be typed as Arrays

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi you Gurus,

I would like your help with my 'challenge' ;-) Any help or advice would be
greatly appriciated!!

I've created a Class wich retrieves FTP files.
In that Class there are several events telling me the filetransfer succeeded
or Failed. I have to get a hole range of files so making it serial would take
a lot of time. (BTW MGET commands doesn't work for me) So i would like to
start multiple gets at the same time and at the same time control the maximum
connections.

So i thought lets make a Array of the classes and each time the event fired
that a file is succesfully recieved make the Class get the next file.

Public Withevents objFTP() as new FTP

But VB.NET does not agree with me and gives me the following error:
'WithEvents' Variables cannot be typed as Arrays

This maybe a easy task for you to solve...
And maybe the answer is so obvious, but i'm stuck now, so any advice as i
said earlier would be gratly appriciated!

Thanks in Advance!

Rob Smeets
 
See "AddHandler" to add your event handlers by code...

I never llok the IL for this but it's likely that the dynamic nature of
arrays make more difficult for the compiler to create the appropriate code
for handling automatically these events...
 
Back
Top