User-952121411 posted
I don't have a Silverlight Project currently wired up with that object type (Menu I believe), but see if the 'parentMenu' item exposes an 'Equals' method like below:
If mnu.parentMenu.Equals(lstMenus(0)) Then
The previous comments were correct about Reference types in VB.NET, but do not confuse for your code snippet about your '<>' comparison. That does not need to be changed as mousePos.'X' is a type of Double, so the comparison to -1 should be fine.
You may have already understood this as your question was in fact only in regards to the 1st 'If' statement.