Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP's With...EndWith equivalent in C# ?
Message
De
16/04/2007 11:31:12
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01216132
Message ID:
01216266
Vues:
16
>What's the difference between:
>
>With this.textbox2 as TextBox
>     .SelectAll();
>     .Text = "Hello World";
>Endwith
>
>
>and
>
>TextBox myText = this.textbox2;
>myText.SelectAll();
>myText.Text = "Hello World";
>
>?
>
>(Beside the second version been more clear to me...)
>
>While there is a reason for this in VFP (performance is better because a long reference is not evaluated every time), there is no reason this change the underlying MSIL in .NET.


Agreed. But if you are used to using WITH..ENDWITH in VFP (or equivalend in VB for that matter), you would like to use it in C#. AndersH says no, so we don't use it. Simple.

After having worked with C# for 2 years I don't miss it anyway. I still use it in VFP.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform