The Operator "=" is not defined for type "Object" and type "Object"
The following code doesn't work:
because "The Operator "=" is not defined for type "Object" and type "Object"". This seems like a missed opportunity to provide a useful capability in the language. There's no way around this is there, apart from doing "If a is b then ... elseif a is c then..."?
The following code doesn't work:
Visual Basic:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As New Object
Dim b As New Object
a = b
Dim c As New Object
Select Case a
Case b
Text = "a is b"
Case c
Text = "a is c"
End Select
End Sub
End Class
because "The Operator "=" is not defined for type "Object" and type "Object"". This seems like a missed opportunity to provide a useful capability in the language. There's no way around this is there, apart from doing "If a is b then ... elseif a is c then..."?