Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Equivalent for With (vb.net) in c#
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01019599
Message ID:
01019747
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Arnaldo,

There is *no* equivalent in C# which at first may seem a little dissapointing. The VB.NET with..endwith does more than save on keystrokes, the compiler actually generates an intermediate object/variable which results in fewer method calls and ultimately faster execution.

The C# language guys have explained their reasoning and give examples of how to gain speed improvements without having with..endwith.

http://msdn.microsoft.com/vcsharp/programming/language/ask/withstatement/

Regards
Neil
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform