When i delete a control from Form, the method fot that control is not deleted from code RRS feed

  • Question

  • Hi, I am using C# VS2015.

    As I build my form I delete some controls. The methods for that control is always left behind in the code.

    Is there any way to remove them automatically?


    Francesco C

    Friday, March 22, 2019 2:43 PM


  • Hello,

    Visual Studio does not have functionality to remove unused/unattached events. Same goes for third party extensions such as Reflector and Code Maid.

    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    profile for Karen Payne on Stack Exchange

    • Marked as answer by Francesco2017 Friday, March 22, 2019 6:48 PM
    Friday, March 22, 2019 6:21 PM