By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,424 Members | 1,351 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,424 IT Pros & Developers. It's quick & easy.


P: n/a
Has anyone used the Contains methods of the TreeNodeTypeCollection?
I'm trying to add a TreeNode Type only if it doens't already exist in
the collection but it's always returning false and therefore is added.
So, now I am getting multiple entries of the same type.

TreeNodeType type = new TreeNodeType();
type.Type = attNode.InnerText

// This is always returning false
bool c = TreeView1.TreeNodeTypes.Contains(type);

if (!c)

On the client, when I look at the page source, I see multple entries
all appearing identical. What's the criteria that determines if the
type is in the collection? Microsoft states:
Determines whether a TreeNodeType is in the TreeNodeTypeCollection.

Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.