The using
statement needs to be in all .cs files that make use of the Exception
. Both classes that throw the exceptions and classes that handle the thrown exceptions.
Visual studio will complain when you are missing a using. To double-check your usings you can remove one and see if the compiler complains, if it does then the using is required. If it doesn't complain then the using was redundant.
FormMainView is the view that calls FormMainPresenter, and that delegates specific tasks to the three classes.
Classes 1 -3 throw various exceptions and they're caught in the Presenter.
Do all 4 files need this using statement, or just the presenter?
If Exceptions are caught in FormMainPresenter
, FormMainView
will not need to know about them so no using is required in FormMainPresenter
. A using in the other 4 classes is required.