#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2009
    Posts
    150
    Rep Power
    30

    C# - Removing old methods


    I have a bunch of old methods that I don't want anymore. However, they were made by double clicking an object in Visual Studio.

    Now, if I delete them, or even comment them out, Visual Studio gets angry because those methods don't exist anymore. Is there a way to get rid of these methods safely?
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,960
    Rep Power
    9397
    Back in the Designer, in the Properties tab/window there's an Events view. Look for the lightning bolt.

    Find the event you don't want for a control - probably for change or double click - and delete the value/method name.


    (Or you can open up the designer file and delete the relevant code, but that's a bit risky: the Designer doesn't like it when people question His Decisions...)

    Comments on this post

    • pasanindeewara agrees
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2009
    Posts
    150
    Rep Power
    30
    Excellent.
    Thanks.

IMN logo majestic logo threadwatch logo seochat tools logo