473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How do you enumerate a iDictionary object?

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>
Jul 21 '05 #1
0 1119

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: greg | last post by:
Hi I use a COM object to interface with domain search from SRS and it returns: SRSPLUSLib.SrsClass srs = new SRSPLUSLib.SrsClass(); srs.Startup(); SRSPLUSLib.IDictionary dic =...
0
by: greg | last post by:
How do I get this interface in plain file - I mean I added reference but dont see no file generated Here is my orig. message Hi I use a COM object to interface with domain search from SRS...
4
by: John C | last post by:
I'm new to C#, so just point me at the correct reference material if this question has been answered before. When creating a new class which implements the IDictionary interface, two versions of...
0
by: Martin Dobson via .NET 247 | last post by:
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...
3
by: Marek | last post by:
Hi I have a class which has a property which implements IDictionary which I would like to display in a propertygrid control. If I add the property expands, but I only get Count, IsReadOnly,...
10
by: J055 | last post by:
Hi I have an OrderedDictionary object where the key is an enum. Is there an easy way to cast it to an integer? Examples/document appreciated. Thanks Andrew
21
by: James Stroud | last post by:
I think that it would be handy for enumerate to behave as such: def enumerate(itrbl, start=0, step=1): i = start for it in itrbl: yield (i, it) i += step This allows much more flexibility...
12
by: Danny Colligan | last post by:
In the following code snippet, I attempt to assign 10 to every index in the list a and fail because when I try to assign number to 10, number is a deep copy of the ith index (is this statement...
1
by: pierre.k | last post by:
Hello, how can I do a cast like IDictionary<int, stringas IDictionary<object, string ? Thanks in advance for your help, pierre.k
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.