Question

Will myStrip.DropDownItems.Clear() remove also SubItems?

mystrip
   - Item1
        - SubItem1
             - AnotherSubItem1
   - Item2

After Clear() method

will it be just:

mystrip

or

mystrip
   - NOTHING HERE
        - SubItem1
              - AnotherSubItem1

Thanks for respond.

Was it helpful?

Solution

the objects will not be destroyed or disposed, but you cannot access them any more by the DropDrownItems list. so if you have no reference anywhere else to the items, the garbage collection will take care about it

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top