Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NOT (x Is Nothing) in 2005
Message
De
09/07/2007 14:40:25
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
09/07/2007 13:50:36
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
Divers
Thread ID:
01223034
Message ID:
01238692
Vues:
6
What is that ugly semi-colon doing there? Curly braces are for girls.

>Hi Mike,
>
>They are both a bit criptic to me. How about this?
>
>
>
>if (x != null)
>{
>     x.Dispose();
>}
>
>
>
>Just kidding of course :-)
>Tim
>
>
>>>I know that I read in 2005 there is a short alternative to
>>>
>>>
>>>If Not (x Is Nothing) Then
>>>   x.Dispose
>>>End If
>>>
>>>
>>>in 2005, but I can't seem to find what it is. Anybody know?
>>
>>I just found what I was looking for. The above code can be replaced with this:
>>
>>
>>If x IsNot Nothing Then
>>   x.Dispose
>>End If
>>
>>
>>It's a little more straightforward to me.
Very fitting: http://xkcd.com/386/
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform