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