Tech Off Post

Single Post Permalink

View Thread: Deprecate Class that's not mine
  • User profile image

    Is there a way to deprecate a C# class that isn't in my assembly?


    In our assembly, we have our own implementation of what the built in MessageBox class. It's called PopupBox. I'd like to discourage the use of MessageBox in our application. I thought a good way would be to make MessageBox deprecated so that it threw a compiler warning.


    If this isn't possible, can you suggest an alternative?