Welcome to AddressOf.com Sign in | Help

Shooting down more Anti-VB'isms...

This guy states:

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

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

“Or“

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...

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

Or

SyncLock Me
  ' yada yada yada
End SyncLock

Hmm... looks like you *CAN DO* these...

Published Wednesday, December 07, 2005 5:02 AM by CorySmith
Filed under: ,

Comments

No Comments

Anonymous comments are disabled