I'm using WebClient in a .NET 4.7.2 WinForms application. I calling the UploadProgressChanged event, which receives an UploadProgressChangedEventArgs object. I'd like to add a extra property to the event args, so I'm trying to extend UploadProgressChangedEventArgs as UploadProgressChangedExtEventArgs.
public class UploadProgressChangedExtEventArgs : UploadProgressChangedEventArgs {
public UploadProgressChangedExtEventArgs() { }
public string Message { get; set; }
}
However, I get the error "CS1729: 'UploadProgressChangedEventArgs' does not contain a constructor that takes 0 arguments."
According to the documentation (and Object Browser seems to support this) UploadProgressChangedEventArgs doesn't have a constructor -- like, at all -- though it's base object ProgressChangedEventArgs does. I've tried using base() to supply the arguments to the ProgressChangedEventArgs constructor, but then I get "does not contain a constructor that takes 2 arguments" error.
Am I just not able to inherit from UploadProgressChangedEventArgs object? Is this a bug in .NET? Am I missing something obvious?