Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
For ... each control?
Message
From
06/07/2004 21:37:54
 
 
To
06/07/2004 19:14:32
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00920575
Message ID:
00921266
Views:
23
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'?" ;)

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform