locked
How to handle or debug controls to control the values on closing the window forms RRS feed

  • General discussion

  • protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }
    Here, When i step into the below line (basically F11)
                    components.Dispose();
               
    I could see the value of "testComboBoxCtrl" got changed with immediate effect - which i want to debug and understand. Please recommend the ways if there are any.   
    Infragistics.Win.UltraWinEditors.UltraComboEditor testComboBoxCtrl;


    SomaSundaram R

    • Moved by KareninstructorMVP Wednesday, February 20, 2019 12:55 PM Moved from data controls and binding
    • Moved by CoolDadTx Wednesday, February 20, 2019 2:50 PM Winforms related
    • Changed type SomaSundaram R Thursday, April 11, 2019 5:56 AM Suggested to move
    Wednesday, February 20, 2019 10:07 AM

All replies

  •  protected override void Dispose(bool disposing)
            {
                if (disposing && (components != null))
                {
                    components.Dispose();
                }
                base.Dispose(disposing);
            }


    SomaSundaram R

    Wednesday, February 20, 2019 10:10 AM
  • Hello,

    Have you read the MSDN documentation on IDisposable?

    https://docs.microsoft.com/en-us/dotnet/api/system.idisposable?view=netframework-4.7.2

    And 

    https://coding.abel.nu/2011/12/implementing-idisposable/


    Please remember to mark the replies as answers if they help and unmark 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.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Wednesday, February 20, 2019 12:54 PM
  • Hi SomaSundaram,

    Welcome to the MSDN forum.

    According to the description, this issue is about the Windows Forms development and our forum is to discuss the VS IDE, I will help you move this thread to the appropriate forum for better support, thank you for your understanding.

    Best regards,

    Sara


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, February 21, 2019 2:01 AM
  • Thank you Sara Liu

    SomaSundaram R

    Thursday, February 21, 2019 2:29 AM
  • Hi,

    In order to better understand "Dispose", you can refer to:

    Understanding and Implementing IDisposable Interface - A Beginner's Tutorial.

    Regards,

    Kyle


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, February 21, 2019 2:54 AM