What is the difference between the two lines of code below? Functionally, I believe them to be identical, but is there a certain case or best practice that would dictate which one I should use?
TreeViewItem selectedItem = MyTreeView.SelectedItem as TreeViewItem;
TreeViewItem selectedItem = (TreeViewItem)MyTreeView.SelectedItem;