Post

Shooting down more Anti-VB'isms...

This guy states:

“I just can’t LIVE without being able to do things like:”

1
2
string oink = myHashTable[someKey] as string;
if(oink != null)

“Or”

1
2
3
lock(this) {
  // yada yada yada
}

Hmmm… let’s see. He states that VB can’t do the above by stating that he “just can’t LIVE without being able to do”. Let me write the above items in VB…

1
2
Dim oink As String = TryCast(myHashTable(someKey), String)
If oink IsNot Nothing Then

Or

1
2
3
SyncLock Me
 ' yada yada yada
End SyncLock

Hmm… looks like you CAN DO these…

This post is licensed under CC BY 4.0 by the author.