473,320 Members | 2,111 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,320 software developers and data experts.

TreeNodeTypeCollection

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)
{
TreeView1.TreeNodeTypes.Add(type);
}

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
0 799

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

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.