Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
For ... each control?
Message
De
06/07/2004 15:49:26
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00920575
Message ID:
00921152
Vues:
22
Oh, that is C#! I saw the "is" keyword, and immediately thought VB. :)

I haven't run accross that in the C# books I'm working through. I see now that this does a reference comparison. Looking at the C# documentation this usage of "is" would not jump to mind.

Thanks (both of you) for your responses,

steve

>
>I believe Kevin's sample is in C# already.
>
>
>if (oForm.Controls[nCtr]  is TextBox)
>{
>	TextBox oText = (TextBox)oForm.Controls[nCtr];
>	oText.Text = "test Textbox" + nCtr.ToString().Trim();
>}
>
>
>Hope that helps...
Steve Gibson
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform