If TreeView.SelectedNode = null is used, would it also null the node object on the SelectedNode?
If TreeView.SelectedNode = null is used, would it also null the node object on
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You appear to be confusing references and objects. You can have a
null-reference (which refers to no object at all), but there is no such thing as anull-object in C#.If on the other hand, you are concerned that setting the
SelectedNodeproperty tonullwill evict the currently selected node from theTreeView, this is not the case – that node will simply be unselected.EDIT: Perhaps you are concerned that the values of other variables that hold references to the currently-selected node will be set to
nullshould theSelectedNodeproperty be set tonull. This is not the case either: