Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'A simple 1-dimensional array [notice the '()' too]
- Dim arrayOfNumbers() As Integer = {1, 2, 3, 4, 5}
- 'Declaring a list on one line through adding an array instead of adding items later
- Dim controlList As New List(Of Control)({myTextBox, myComboBox, myLinkLabel})
- 'Creating an array 'on the fly' for a loop or another reason
- For Each control As Control In {myTextBox, myComboBox, myLinkLabel}
- control.Enabled = True
- Next
- Dim A As Boolean = True
- Dim B As Boolean = False
- If A AndAlso B Then 'A and B will be evaluated
- If A OrElse B Then 'OrElse will shortcircuit since whatever B returns will not change the outcome of this validation
- If B AndAlso A Then 'AndAlso will shortcircuit
- If B OrElse A Then 'B and A will be evaluated
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement