Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- With Me.Button3
- IIf(.Width = 123, .Width = 233, .Width = 150)
- End With
- End Sub
- With Me.Button3
- .Width = IIf(.Width = 123, 233, 150)
- End With
- With Me.Button3
- .Width = If(.Width = 123, 233, 150)
- End With
- ' IIf function - not recommended since it is not typesafe and evaluates all arguments.
- .Width = IIf(.Width = 123, 233, 150)
- ' If operator - typesafe and only evaluates arguments as necessary.
- .Width = If(.Width = 123, 233, 150)
- ' If statement - not an expression.
- If .Width = 123 Then .Width = 233 Else .Width = 150
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Button3.Width = If(Button3.Width = 123, 233, 150)
- End Sub
Add Comment
Please, Sign In to add comment