Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using of AndAlso
Message
De
01/09/2011 10:35:25
 
 
À
01/09/2011 10:28:59
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01522454
Message ID:
01522467
Vues:
34
>(1) And - http://msdn.microsoft.com/en-us/library/sdbcfyzh.aspx
>Evaluatates all expressions, you can use side-effects
>
>
>
>If ( ( x   > 1) And MyFunction()) )
>
>
>MyFunction() will be called regardless of whether x > 1 or not
>
>
>
>
>(2) AndAlso - http://msdn.microsoft.com/en-us/library/cb8x3kfz.aspx
>
>
>Is said to use short-circuiting and stops evaluating as soon as it finds that it has processed sufficient parts of the expression to know the result
>
>
>
>If ( ( x  > 1) AndAlso MyFunction()) )
>
>
>if x less or equal to 1, then MyFunction() will not be called

Very good, thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform