I am creating a web custom control in asp.net and I want toremove all inherited properties from my control and design-time.The reason I have posted in this newsgroup is because I amhaving problems enumerating through a iDictionary collectionthat is retrieved from the PostFilterProperties() Methodinherited through the ControlDesigner Class.
Basically I am trying to enumerate through the whole propertycollection and only keep the properties I have implemented. Hereis a sample of the code:
Protected Overrides Sub PostFilterProperties(ByVal Properties AsIDictionary)
Dim PropObject As IDictionaryEnumerator =Properties.GetEnumerator()
PropObject.MoveNext()
For Each PropObject In Properties
If Not (PropObject.Key = "Title" Or _
PropObject.Key = "AlignTitle") Then
Properties.Remove(PropObject.Key)
End If
Next
End Sub
Can anyone explain what I'm doing wrong? Everytime I debug it itgets to the For Each loop and then just exits the debugger...
Thanks in advance
--------------------------------
Martin Dobson
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>S4TznxtSikGl2c8a3IgRAw==</Id>