我想知道Visual Basic的等價於Java的「!」如何將在Java中工作什麼是Visual Basic等同於Java的「!」?
例子:
If !code.DoesExist {
log.info("This code doesn't exist!");
}
Else {
log.info("This code does exist");
}
我希望你明白我的意思。
在我的代碼,我需要做到以下幾點:
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
我需要它在第7行。
注意:我不能只使用「其他」我需要特別指出,如果沒有找到HTML源代碼中的imgur圖像,那麼應該發生這種情況。
使用NOT運算符,在這裏指出http://stackoverflow.com/questions/279208/is-there-a-vb-net-equivalent-for-cs-operator – trpride 2015-04-04 06:49:06