I’m trying to hide an event from an inherited class, but not via EditorBrowserable attribute.
I have a DelayedFileSystemWatcher which inherits from FileSystemWatcher and I need to hide the Changed, Created, Deleted and Renamed events and make them private.
I tried this, but it does not work:
/// <summary>
/// Do not use
/// </summary>
private new event FileSystemEventHandler Changed;
The XML comment is not showing in IntelliSense (the original info is shown). However, if I change the access modifier to public, the XML comment is shown in IntelliSense.
Any help is is welcome.
You don’t want to use it but it trivially solves your problem:
The only other thing you can do is encapsulate it. Which is doable, the class just doesn’t have that many members and you are eliminating several of them: