Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For ... each control?
Message
De
06/07/2004 21:37:54
 
 
À
06/07/2004 19:14:32
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00920575
Message ID:
00921266
Vues:
21
Hey, Bonnie,

Thanks for the info.

BTW, there's one statement that Matthew made in the GDN post where I'm seeing something different - that it's not necessary to cast if you're only going to access the Text property.

I tried a simple test without casting that worked in Winforms, but generated a compile error in Webforms. (Not all common Webform controls have a text property, so perhaps that's why?) Maybe I'm missing something, but I wasn't able to do it.

But regardless, I read through the messages between you and Matthew. I agree with him that 'as' is more efficient than 'is' if you plan on casting right away (which is what I usually do), so I think I'm going to use that from now on.

BTW, Jesse Liberty's popular C# book contains the same recommendation as the .NET Journal link.

Good stuff! Thanks for the tip...
Kevin

P.S. Maybe that's what Clinton meant by "What is 'is'?" ;)

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform