473,395 Members | 2,446 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,395 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>
Nov 22 '05 #1
0 854

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

Similar topics

2
by: Nick Jacobson | last post by:
Casting an 'enumerate' object destroys it?? Is that supposed to happen, or is it a bug? For example: a = e = enumerate(a) print dict(e) print dict(e)
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...
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.