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.