Object properties in the PropertyDescriptorCollection class do not update as you expect (836675)



The information in this article applies to:

  • Microsoft Visual Basic .NET (2003)
  • Microsoft Visual Basic .NET (2002)
  • Microsoft Visual C# .NET (2003)
  • Microsoft Visual C# .NET (2002)

SYMPTOMS

When you call the PropertyDescriptorCollection.Clear method, and you add PropertyDescriptor objects to your Microsoft Visual Basic .NET project, you may find that the properties of the objects in the PropertyDescriptorCollection class are not updated as you expect when you run your project. This problem occurs when the objects that you added have the same name as objects in the PropertyDescriptorCollection class before you called the PropertyDescriptorCollection.Clear method.

CAUSE

The problem occurs because the PropertyDescriptorCollection.Clear method does not remove cached objects from the collection.

WORKAROUND

To work around this problem, destroy the original PropertyDescriptorCollection class, and then create a new collection.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MinorLast Reviewed:2/9/2006
Keywords:kbvs2005swept kbvs2005doesnotapply kbprb KB836675 kbAudDeveloper