Reputation: 131
I would like to know Visual Basic's equivalant to Java's "!"
Example of how it would work in Java:
If !code.DoesExist {
log.info("This code doesn't exist!");
}
Else {
log.info("This code does exist");
}
I hope you understand what I mean.
In my code I need to do the following:
If imgUrl.Contains("imgur") Then
ImagesFound += 1
Select Case ImagesFound
Case 1
imgBox.ImageLocation = imgUrl
End Select
ElseIf !imgUrl.Contains("") Then
'<some code here>
End If
I need it at the 7th line.
Note: I can't just use "Else" I need to specifically point out that if an image with imgur in the HTML source wasn't found, then this and that should happen.
Upvotes: 0
Views: 79
Reputation: 856
As per suggestion, here is more elaborated answer :
Not Keyword : Performs logical negation on a Boolean expression, or bitwise negation on a numeric expression.
For more info : https://msdn.microsoft.com/en-us/library/2cwcswt4.aspx
<> : Checks if the values of two operands are equal or not; if values are not equal, then condition becomes true.
For more info : http://www.tutorialspoint.com/vb.net/vb.net_operators.htm
Upvotes: 2