System.Windows.Forms 1.0.5000.0 2.0.0.0 System.Object System.Collections.IList System.ComponentModel.Editor("System.Windows.Forms.Design.TreeNodeCollectionEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor)) The , , and methods enable you to add and remove individual tree nodes from the collection. Enumerating the collection and removing nodes is not supported. You can also use the or methods to add or remove all the tree nodes from the collection. Classes cannot inherit from the class. Represents a collection of objects. Method System.Windows.Forms.TreeNode You can also add new objects to the collection by using the or methods. To remove a that you previously added, use the , , or methods. Adds a new tree node with the specified label text to the end of the current tree node collection. A that represents the tree node being added to the collection. The label text displayed by the . 1.0.5000.0 2.0.0.0 Method System.Int32 This version of the method allows you to add previously created objects to the end of the tree node collection. You can also add new objects to the collection by using the or methods. To remove a that you previously added, use the , , or methods. A can be assigned to only one control at a time. To add the tree node to a new tree view control, you must remove it from the other tree view first or clone it. Adds a previously created tree node to the end of the tree node collection. The zero-based index value of the added to the tree node collection. The to add to the collection. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Windows.Forms.TreeNode The property corresponds to the key for a in the . You can also add new objects to the collection by using the or methods. Creates a new tree node with the specified key and text, and adds it to the collection. The that was added to the collection. The name of the tree node. The text to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode The property corresponds to the key for a in the . The parameter refers to an image in the property of the parent . The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. Creates a tree node with the specified key, text, and image, and adds it to the collection. The that was added to the collection. The name of the tree node. The text to display in the tree node. The index of the image to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode The property corresponds to the key for a in the . The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and image, and adds it to the collection. The that was added to the collection. The name of the tree node. The text to display in the tree node. The image to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode The property corresponds to the key for a in the . The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The parameter refers to an image in the property of the parent . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and images, and adds it to the collection. The tree node that was added to the collection. The name of the tree node. The text to display in the tree node. The index of the image to display in the tree node. The index of the image to be displayed in the tree node when it is in a selected state. Method 2.0.0.0 System.Windows.Forms.TreeNode The property corresponds to the key for a in the . The tree node is added to the end of the collection. You can also add new objects to the collection by using the or methods. The parameter refers to an image in the property of the parent . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and images, and adds it to the collection. The that was added to the collection. The name of the tree node. The text to display in the tree node. The key of the image to display in the tree node. The key of the image to display when the node is in a selected state. Method System.Void The objects contained in the array are appended to the end of the collection. You can use the method to quickly add a group of previously created objects to the collection instead of manually adding each to the collection using the method. To remove a that you previously added, use the , , or methods. Adds an array of previously created tree nodes to the collection. An array of objects representing the tree nodes to add to the collection. 1.0.5000.0 2.0.0.0 Method System.Void You can use this method to clear the entire collection of tree nodes from a tree view. To remove an individual tree node from the collection, use the or methods. To add new objects to the collection, use the , , or methods. Removes all tree nodes from the collection. 1.0.5000.0 2.0.0.0 Method System.Boolean This method enables you to determine whether a is a member of the collection before attempting to perform operations on the . You can use this method to confirm that a has been added to or is still a member of the collection. The amount of time this method takes is proportional to the size of the node collection, so you may want to avoid using it with large collections. This method checks for reference equality only. You cannot use it to determine whether an equivalent but different node is in the collection. One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. Determines whether the specified tree node is a member of the collection. true if the is a member of the collection; otherwise, false. The to locate in the collection. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Boolean The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the parameter is null or an empty string, the property returns false. Determines whether the collection contains a tree node with the specified key. true to indicate the collection contains a with the specified key; otherwise, false. The name of the to search for. Method System.Void To be added. Copies the entire collection into an existing array at a specified location within the array. The destination array. The index in the destination array at which storing begins. 1.0.5000.0 2.0.0.0 Property System.ComponentModel.Browsable(false) System.Int32 To be added. The property holds the number of objects assigned to the collection. You can use the property value as the upper bounds of a loop to iterate through a collection. Because the index value of a collection is a zero-based index, you must subtract one from the looping variable. If you do not account for this, you will exceed the upper bounds of the collection and throw an exception. Gets the total number of objects in the collection. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Windows.Forms.TreeNode[] The property corresponds to the key for a in the . The key comparison is not case-sensitive. If the parameter is null or an empty string, or there are no matches, the property returns an empty array. Finds the tree nodes with specified key, optionally searching subnodes. An array of objects whose property matches the specified key. The name of the tree node to search for. true to search child nodes of tree nodes; otherwise, false. Method System.Collections.IEnumerator To be added. Returns an enumerator that can be used to iterate through the tree node collection. An that represents the tree node collection. 1.0.5000.0 2.0.0.0 Method System.Int32 The amount of time this method takes is proportional to the size of the node collection, so you may want to avoid using it with large collections. This method checks for reference equality only. You cannot use it to retrieve the index of an equivalent but different node in the collection. One implication of the reference-equality requirement is that you cannot customize the behavior of this method for derived types by overriding the method of the class. Returns the index of the specified tree node in the collection. The zero-based index of the item found in the tree node collection; otherwise, -1. The to locate in the collection. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Int32 If is called successively, the last returned index will be checked for a key match first, and if there is no match, the search starts at the beginning of the collection. The property corresponds to the key for a in the . The key comparison is not case-sensitive. If is null or an empty string, the property returns -1. Returns the index of the first occurrence of a tree node with the specified key. The zero-based index of the first occurrence of a tree node with the specified key, if found; otherwise, -1. The name of the tree node to search for. Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. Creates a tree node with the specified text and inserts it at the specified index. The that was inserted in the collection. The location within the collection to insert the node. The text to display in the tree node. Method System.Void If the property is set to true, the parameter value is ignored. The is inserted into the tree view, and the resorted. You can also add new objects to the collection by using the or methods. To remove a that you previously added, use the , , or methods. A can be assigned to only one control at a time. To add the tree node to a new tree view control, you must remove it from the other tree view first or clone it. Inserts an existing tree node into the tree node collection at the specified location. The indexed location within the collection to insert the tree node. The to insert into the collection. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . Creates a tree node with the specified text and key, and inserts it into the collection. The that was inserted in the collection. The location within the collection to insert the node. The name of the tree node. The text to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and image, and inserts it into the collection at the specified index. The that was inserted in the collection. The location within the collection to insert the node. The name of the tree node. The text to display in the tree node. The index of the image to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and image, and inserts it into the collection at the specified index. The that was inserted in the collection. The location within the collection to insert the node. The name of the tree node. The text to display in the tree node. The key of the image to display in the tree node. Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . The parameter refers to an image in the property of the parent . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and images, and inserts it into the collection at the specified index. The that was inserted in the collection. The location within the collection to insert the node. The name of the tree node. The text to display in the tree node. The index of the image to display in the tree node. The index of the image to display in the tree node when it is in a selected state. Method 2.0.0.0 System.Windows.Forms.TreeNode If the property is set to true, the parameter value is ignored. The is inserted into the tree view and the is sorted again. You can also add new objects to the collection by using the or methods. The property corresponds to the key for a in the . The parameter refers to an image in the property of the parent . The parameter refers to an image in the property of the parent . Creates a tree node with the specified key, text, and images, and inserts it into the collection at the specified index. The that was inserted in the collection. The location within the collection to insert the node. The name of the tree node. The text to display in the tree node. The key of the image to display in the tree node. The key of the image to display in the tree node when it is in a selected state. Property System.Boolean To be added. To be added. Gets a value indicating whether the collection is read-only. 1.0.5000.0 2.0.0.0 Property System.Windows.Forms.TreeNode To be added. To be added. To be added. To be added. 1.0.5000.0 2.0.0.0 Property 2.0.0.0 System.Windows.Forms.TreeNode To be added. To be added. To be added. To be added. Method System.Void When a is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. You can also remove a that you previously added by using the or methods. Enumerating the collection and removing nodes is not supported. To add new objects to the collection, use the , , or methods. Removes the specified tree node from the tree node collection. The to remove. 1.0.5000.0 2.0.0.0 Method System.Void When a is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. You can also remove a that you previously added by using the or methods. Enumerating the collection and removing nodes is not supported. To add new objects to the collection, use the , , or methods. Removes a tree node from the tree node collection at a specified index. The index of the to remove. 1.0.5000.0 2.0.0.0 Method 2.0.0.0 System.Void The property corresponds to the key for a in the . Removes the tree node with the specified key from the collection. The name of the tree node to remove from the collection. Property 1.0.5000.0 2.0.0.0 System.Boolean To be added. To be added. Gets a value indicating whether access to the collection is synchronized (thread safe). Property 1.0.5000.0 2.0.0.0 System.Object To be added. To be added. Gets an object that can be used to synchronize access to the collection. Method 1.0.5000.0 2.0.0.0 System.Int32 If is not a , the method will use the string returned by the method of the class. Adds an object to the end of the tree node collection. The zero-based index value of the that was added to the tree node collection. The object to add to the tree node collection. Method 1.0.5000.0 2.0.0.0 System.Boolean If is not a , the method returns false. Therefore, you cannot pass in a string to determine if the collection contains a node that has the value of the string as its property. Determines whether the specified tree node is a member of the collection. true if is a member of the collection; otherwise, false. The object to find in the collection. Method 1.0.5000.0 2.0.0.0 System.Int32 If is not a , the method returns -1. Therefore, you cannot pass in a string to find the node that has the value of the string as its property. Returns the index of the specified tree node in the collection. The zero-based index of the item found in the tree node collection; otherwise, -1. The to locate in the collection. Method 1.0.5000.0 2.0.0.0 System.Void If the property is set to true, the parameter is ignored. The is inserted into the tree view and the is sorted again. Inserts an existing tree node in the tree node collection at the specified location. The indexed location within the collection to insert the tree node. The to insert into the collection. Property 1.0.5000.0 2.0.0.0 System.Boolean To be added. To be added. Gets a value indicating whether the tree node collection has a fixed size. Property 1.0.5000.0 2.0.0.0 System.Object To be added. To be added. To be added. To be added. Method 1.0.5000.0 2.0.0.0 System.Void You cannot pass in a string to remove the node that has the value of the string as its property. When a is removed from the tree node collection, all subsequent tree nodes are moved up one position in the collection. Removes the specified tree node from the tree node collection. The to remove from the collection.