Populating DownloadProgressChangedEventArgs

  • Thread starter Thread starter MaxMax
  • Start date Start date
M

MaxMax

How can I create and "fill" a DownloadProgressChangedEventArgs class? The
WebClient does it... But I can't do it "manually". It doesn't seem to have a
constructor, and it's members are protected. It's base class
(ProgressChangedEventArgs) has a constructor that can be used.

Thanks
 
If you wanted to, you could probably hack it through reflection,
however, beyond that, you can't use it, as the constructor is most likely
internal.
 
Hi MaxMax,

I believe the DownloadProgressChangedEventArgs is used internally, think
about it as a "read-only" class; normally it's used by base class library
such as WebClient.

Can you tell us why you want to manually create an instance of this class?
If you need to use a customized EventArgs to represent the BytesRecieved,
TotalBytesToReceive information, you're always free to use your own
EventArgs class. After all, it's just a simple class.


Regards,
Walter Wang ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
 
I believe the DownloadProgressChangedEventArgs is used internally, think
about it as a "read-only" class; normally it's used by base class library
such as WebClient.

Can you tell us why you want to manually create an instance of this class?
If you need to use a customized EventArgs to represent the BytesRecieved,
TotalBytesToReceive information, you're always free to use your own
EventArgs class. After all, it's just a simple class.
I wanted to call the event manually, so I needed the class. Now I will
simply create a method called both by the event and by me.

--- bye
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top