Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Equivalent for With (vb.net) in c#
Message
From
03/06/2005 06:19:10
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01019599
Message ID:
01019747
Views:
17
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
Previous
Reply
Map
View

Click here to load this message in the networking platform