Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP's With...EndWith equivalent in C# ?
Message
 
 
À
16/04/2007 06:58:16
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:
01216209
Vues:
13
>>Is it very difficult to implement With...Endwith in C# for .NET Team ? Why only VB.NET support that Implementation ? Any reason for this ?
>>
>>Just curious, thanks :-)
>>
>>( still dreaming to shift my VFP code to C# code ... :-) )
>

>
>
>Not, it's not difficult (as you see it works in VB). The reason is that they did not think it was needed or desired as they wanted to keep the language "pure". Going overboard if you ask me.

Hi, Alex.

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.

Regards,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform