adding a property to an EventArgs

Posted by aleroot on Stack Overflow See other posts from Stack Overflow or by aleroot
Published on 2010-06-06T10:08:00Z Indexed on 2010/06/06 10:12 UTC
Read the original article Hit count: 236

Filed under:

I have extended the standard FileSystemWatcher class by adding a string property (fileToTest), now i need to extend also the FileSystemEventArgs to add this property how can i do this ?

my extend FileSystemWatcher :

    class AleFileSystemWatcher : FileSystemWatcher
{
    public string fileToTest { get; set; } 
}

The FileSystemEventArgs fileToTest property should be the same of AleFileSystemWatcher fileToTest .

Can i do this ?

© Stack Overflow or respective owner

Related posts about c#