Treeview Key Property
In .Net 2.0, the treeview does not have the key property.( Ref : http://support.microsoft.com/kb/311318). While editing a treenode, updating the Treenode key wasn’t possible because of this. Because only using the key property, the Find will work.
To solve this issue.
1) Select the Node, which is to be edited.
2) Select the Parent Node, of the selected node, Else mark this node as Root Node, that does not have a parent Node.
3) Select all the nodes under this node and assign this to TreeNode Array.
4) Remove the selected Node, insert the Node with the modified Text and Key.
5) Assign the parent node and child Nodes.
It will create a new node with the key.
Nullable type
In Microsoft .Net 2.0, the value types can be extended to take their actual values as well as null value. Such extension is called nullable type.
To make a boolean to nullable type, use the keyword “Nullable”.
Nullable <bool> Confirm = null;
By declaring a variable nullable enables HasValue and Value members, which can be used to check the value has been set.
if(Confirm.HasValue)
{
//Do some operations.
}
This feature only available in .Net 2.0