Determine if two objects are the same
Set a Boolean expression to test the two objects.
In a test expression, use the
is operator to take two objects as operands.
is returns True if two objects point to the same class of instances.
Determine if two objects are different
Sometimes, you want to perform an operation on two objects, and are not suitable for combining not and is, such as If not Obj1 is obj2. In this case, you can use the
IsNot operator.
Set a Boolean expression to test the two objects.
In a test expression, use the IsNot operator to take two objects as operands. IsNot returns True if two objects point to a different class instance.
Private Sub Radiobutton1_click (ByVal sender as System.Object, ByVal e as System.EventArgs) Handles Radiobutton1.click, Rad Iobutton4.click, Radiobutton3.click, Radiobutton2.click
Dim button as RadioButton = CType (sender, RadioButton)
If Sender is RadioButton1 Then
MsgBox ("OK") end
If End
Sub